Answer:
Step-by-step explanation:
#include<stdio.h>
#include<conio.h>
int main(){
int a,b=1,sum=0;
printf("Enter the number:");
scanf("%d",&a);
while(b<=a){
sum=sum+b;
b=b+1;
}
printf("The sum is %d\\",sum);
getch();
1.6m questions
2.0m answers