F Sum of a series program in CPP | CodeTheta

Sum of a series program in CPP

Code :
using namespace std;
int main() {
int i, number, sum=0;
cout<<"Enter the limit : ";
for(i=1; i<=number; i++) {
    sum = sum + i;
cout<<"Sum of given series : "<<sum;
return 0;

Output :

IDE Used To Test This Code : DEV C++.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Post a comment