How to find Running sum in C++ Programming
using for loop in C++
#include<istream.h>
int main()
{
int num;
int sum=0;
cout<<"please enter five integer to find its sum"<<endl;
for(int a=1;a<6;a++)
{
cin>>num;
sum=sum+num;
};
cout<<"the sum is"<<endl;
cout<<sum<<endl;
system("pause");
return 0;
};