Home Forums C Programming Problem solving few assignments in C language Reply To: Problem solving few assignments in C language

#3238
NAYAN
Participant

question no:17 answer

#include
#include
main()
{
int n,sum=0,i;
printf("enter a number");
scnaf("%d",&n);
for(i=0;i {
sum=sum+i;
}
printf("n the sum is %d",sum);
}