#include”stdio.h”
#include”conio.h”
void main()
{
int sum=0,n=1;
clrscr();
printf("\t\t\sum of 10 square numbers\n\n");
loop:
sum=sum+(n*n);
if(n==10)
goto print;
else
{
n=n++;
goto loop;
}
print("%d",sum);
getch();
}
OUTPUT WILL BE
Sum of 10 square numbers
385
Google Ads
Saturday, May 30, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment