04.01.2023 Views

Documento sin título (1)

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

int g;

int i;

int valor_numero;

int w;

int x;

int z;

cont = 0;

for (i=0;i<=3;i+=1) {

printf("dame un numero\n");

scanf("%d",&valor_numero);

if (valor_numero%2==0) {

cont = cont+1;

} else {

cont = cont;

}

}

printf("LOS NUMEROS PARES SON: %d\n",cont);

/* SEGUNDA PARTE */

printf("DAME 4 NUMEROS\n");

scanf("%d",&a);

scanf("%d",&b);

scanf("%d",&c);

scanf("%d",&d);

if (a>b && a>c && a>d) {

printf("EL NUMERO MAYOR ES%d\n",a);

}

if (b>a && b>c && b>d) {

printf("EL NUMERO MAYOR ES%d\n",b);

}

if (c>a && c>b && c>d) {

printf("EL NUMERO MAYOR ES%d\n",c);

}

if (d>a && d>b && d>c) {

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!