Code:
#include <stdio.h>
main ( )
{
int i, num[6];
int oddNumbers = 0,evenNumbers = 0;
for(i=0; i<=5; i++)
{
printf("Enter a number betweem -20 and + 20 \n");
fflush(stdin);
scanf("%d",&num[i]);
if (num [i] <-20 || num [i] > 20 )
{
printf("number you entere outside the limits");
i=i -1;}
}
printf("\n Even numbers are:\n");
for (i=0;i< 6; i++)
{
if (num[i] % 2 == 0)
{
printf("%d\n",num[i]);
{
else CAN YOU TELL ME WHY THIS ELSE STAMENT IS NOT WORKING and giving me the odd numbers i can get it to do evens
{
printf("\n Odd Numbers are:\n")
}
// printf("\n Odd Numbers are:\n");
}
// else
// this else statement is not working what am i missing for it to print the
// printf("%d\n",num[i]);
}
}
// printf("\n Odd Numbers are:\n");
// for (i=0; i< num; i_++)
{
//if (num[i]% 2 !=0)
{
// printf("%d\n",num[i]);
}
}
}