Display all the odd and even numbers from 1 to 50.

#include <stdio.h>

int main(void)
{
int num;

for(num = 1 ; num <= 50 ; num++)
{
if(num % 2 == 0)
printf("\t%d", num);
else
printf("\n%d", num);
}

return 0;
}

No comments:

Post a Comment

kiss on google ads if you are anonymous because your ip is trackable.thank you.

......from.admin