Wednesday, 5 October 2011

Using for loop addition


#include<stdio.h>
#include<conio.h>
main()
{
int i,j,c=1;
clrscr();
for(i=1;i<=100;i++)
{
c=c+i;
}
printf("c is %d\n",c);
getch();
return 0;
}

No comments:

Post a Comment