#include<stdio.h>
main()
{
int a,b,c;
printf("\n\n\t a.Integers from 1-100 \n\n");
for (a=1;a<=100;a++)
{
printf(" %d",a);
}
printf("\n\n\t b.Even numbers from 1-100\n\n");
for (b=1;b<=100;b++)
{ if (b%2==0)
printf(" %d",b);
}
printf("\n\n\t c.Odd numbers from 1-100\n\n");
for (c=1;c<=100;c++)
{ if (c%2!=0)
printf("%d ",c);
}
printf("\n");
}
main()
{
int a,b,c;
printf("\n\n\t a.Integers from 1-100 \n\n");
for (a=1;a<=100;a++)
{
printf(" %d",a);
}
printf("\n\n\t b.Even numbers from 1-100\n\n");
for (b=1;b<=100;b++)
{ if (b%2==0)
printf(" %d",b);
}
printf("\n\n\t c.Odd numbers from 1-100\n\n");
for (c=1;c<=100;c++)
{ if (c%2!=0)
printf("%d ",c);
}
printf("\n");
}
No comments:
Post a Comment