predict the output:
#includestdio.h
int main()
{
int n,sum=0;
printf("enter the number:");
scanf("%d",&n);
for(int i=0;i=n;i++)
{
sum+=i;
}
printf("%d", sum);
return 0;
}
  • Take input as 30.

Posted on by