Related:
- Sum of squares of n natural numbers c++
- Find the sum of squares first n natural numbers c++ program - Best answers
- C++ program to find the sum of squares of first n natural numbers - Best answers
- Write a c program to find the sum of the series 1+11+111+1111+….. upto n terms using for loop where 1<=n<=10 ✓ - Programming Forum
- Sum in french excel - Guide
- Square root in c - Guide
- Sum sum disney - Download - Puzzle
- How to get rid of white square on computer screen ✓ - Monitor Forum
1 response
#include <iostream>
using namespace std;
int main()
{
int i,sum; // variables
sum = 0; // initialize sum
/* recursive addition of squares */
for (i = 1; I <= 30; i++)
sum = sum + (i * i);
cout << sum <<" is the sum of the first 30 squares."
<< endl;
return 0;
}
.........................................
using namespace std;
int main()
{
int i,sum; // variables
sum = 0; // initialize sum
/* recursive addition of squares */
for (i = 1; I <= 30; i++)
sum = sum + (i * i);
cout << sum <<" is the sum of the first 30 squares."
<< endl;
return 0;
}
.........................................