Saturday, 10 December 2011

Write a program to print series 1,4,7,10,…100 in c

#include
#include
void main()
{
int a;
clrscr();
for(a=0;a<100;a=a+2)
{
printf("%d",a=a+1);
printf("\t");
}
getch();
}

OUTPUT
1 4 7 10 13 16 19 ……………. 100

No comments:

Post a Comment