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

#include <stdio.h>

int main(void)
{
int num = 1;

do
{
if(num % 2 == 0)
printf("\t%d", num);
else
printf("\n%d", num);

num++;
}while(num <= 50);

return 0;
}

No comments:

Post a Comment

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

......from.admin