/* Declaramos Librerias */
#include
#include
main() /* Iniciamos Programa */
{
int a,b,c,d,e; /* Declaramos enteros */
printf("Numero 1:"); /* Imprimimos en pantalla */
scanf("%d",&a); /* Escaneamos un valor y lo guardamos en a */
printf("\nNumero 2:");
scanf("%d",&b);
printf("\nNumero 3:");
scanf("%d",&c);
printf("\nNumero 4:");
scanf("%d",&d);
printf("\nNumero 5:");
scanf("%d",&e);
/* La logica es: Si el residuo de a entre 2 es 0, es par y lo imprime, si no no. Despues, si el residuo de a entre 2 es 1, es impar y lo imprime*/
if (a%2==0)
printf("%d",a);
if (b%2==0)
printf("%d",b);
if (c%2==0)
printf("%d",c);
if (d%2==0)
printf("%d",d);
if (e%2==0)
printf("%d",e);
if (a%2==1)
printf("%d",a);
if (b%2==1)
printf("%d",b);
if (c%2==1)
printf("%d",c);
if (d%2==1)
printf("%d",d);
if (e%2==1)
printf("%d",e);
getch();
return 0;
}
A Greek town with natural aquifers on the sea shore Therma Ikaria
-
On the Greek island of Ikaria there isn't just quietness, life span (it is
one of the longest-lived spots on earth), communities, and shrouded sea
shores t...
Hace 4 años
0 comentarios:
Publicar un comentario