// use the labrarey
#include <iostream>
// using the namespace
using namespace std;
// ; means end progran line
// endl means new line
// \n means new line
// start the program
int main(){
int n;
int sum = 0;
int a = 1;
cout<<"Enter the number:- ";
cin>>n;
while(a<=n)
{
sum+=a;
a++;
}
cout<<endl;
cout<<"The sum of the number is "<<sum;
}
Thanks you for commenting your questions. I will see question and respond you.