1.

WAP in c++ to display sum of numbers between 1 and the number entered

Answer»

Answer:

#include

#include

void main(){

int n,i,SUM=0;

clrscr();

cout<<"please enter the number\n";

CIN>>n;

for(i=1;i<=n;i++)

{

sum=sum+i;

cout<<"The sum of the number is:" <

}

getch();

}

Explanation:

I THINK it is UNDERSTANDABLE



Discussion

No Comment Found