Feed Headline Animator

Program to find sum of digits (1-20) using if and goto statement

main()
{
int
clrscr();
n=1;
s=0;
abc;
s=s+n;
n=n+1;
if(n>=20)
goto abc;
print(“Sum of digits =%d\n”,s);
getch();
}


Posted by: Wasim Javed

No comments:

Post a Comment