write a program in C- language that prints the sum of all the numbers from one to twenty . write also , the output of this program .
Answers
Answered by
1
#include<iostream>
using namespace std;
int main()
{
int i;
for(i=20; i<=20; i++)
{
sum+=i;
}
cout<<sum;
return 0;
}
OUTPUT:
210
ankit41947:
thanks
Answered by
0
#include<iostream>
using namespace std;
int main()
{
int i;
for(i=20; i<=20; i++)
{
sum+=i;
}
cout<<sum;
return 0;
}
OUTPUT:
210
Similar questions