ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Hola


Enviado por   •  4 de Octubre de 2015  •  Exámen  •  1.001 Palabras (5 Páginas)  •  137 Visitas

Página 1 de 5

Ejercicio 11

/* Mauricio Mtz */

#include

int main()

{

int Q,W,E,R,T,q;

printf("teclea el primer numero:");

scanf("%d", &Q);

printf("teclea el segundo numero:");

scanf("%d",&W);

printf("teclea el tercer numero:");

scanf("%d",&E);

R=(Q+W+E);

T=(Q*W*E);

q=((Q+W+E)/3);

printf("Suma: %d\n",R);

printf("producto:%d\n",T);

printf("promedio:%d\n",q);

printf("\n");

system("pause");

return 0;

}

Ejercicio 15

/* Mauricio Mtz */

#include

int main()

{

int q,w;

printf("teclea un numero:");

scanf("%d",&q);

printf("teclea otro numero:");

scanf("%d",&w);

if(q>w);

{

if(q%w==0)

printf("el numero: "+q);

printf("el multiplo de: "+w);

printf("el numero:"+q);

printf("no es multiplo de:"+w);

}

{

if(w%q==0)

printf("el numero:"+w);

printf("no es multiplo de:"+q);

}

system("pause");

return 0;

}

Ejercicio 16

/* Mauricio Mtz */

#include

int main ()

{

int x ;

printf("Introdusca el precio del producto: \n");

scanf("%f", x);

if(x<1500)

{

x=x+((x/100)*11) ;

}

if(x>=1500)

{

x=  x+((x/100)*8);

}

printf("el valor del producto es"+x);

system("pause");

return 0;

}

Ejercicio 20

/* Mauricio Mtz */

#include

int main()

{

int  x ;

clrscr();

printf("Meses del aÒo");

printf("introduzca un numero:");

scanf("%d",&x);

if(x>0 && x<12)

{

if(x==1)

{printf("ENERO");}

if(x==2)

{printf("FEBRERO");}

if(x==3)

{printf("MARZO");}

if(x==4)

{printf("ABRIL");}

if(x==5)

{printf("MAYO");}

if(x==6)

{printf("JUNIO");}

if(x==7)

{printf("JULIO");}

if(x==8)

{printf("AGOSTO");}

if(x==9)

{printf("SEPTIEMBRE");}

if(x==10)

{printf("OCTUBRE");}

if(x==11)

{printf("NOVIEMBRE");}

if(x==12)

{printf("DICIEMBRE");}

}

system("pause");

return 0;

}

                                                                  Problema 23

#include

#include

int main()

{

char nom[15];

float P, Pt, C;

int Prod;

printf("ingrese el nombre de cliente: ");

scanf("%s", &nom);

printf("\n\t\tL I S T A\tPRECIO:");

printf("\n\n\t\t1.-Libreta\t $8.50\n\t\t2.-Pluma\t $2.50\n\t\t3.-Lapiz\t $2.00\n\t\t4.-Borrador\t $1.50\n\t\t5.-Sacapuntas\t $1.00 ");

printf("\n\n ingrese el producto que se llevara: ");

scanf("%d", &Prod);

{

switch (Prod){

case 1: printf("\n\n Cuantas libretas llevara?: ");

scanf("%f", &C);

P= C*8.50; break;

case 2: printf("\n\n Cuantas plumas llevara?: ");

...

Descargar como (para miembros actualizados)  txt (7.2 Kb)   pdf (81.3 Kb)   docx (125.8 Kb)  
Leer 4 páginas más »
Disponible sólo en Clubensayos.com