Related:
- Sum of squares of n natural numbers c++
- Find the sum of squares first n natural numbers c++ program - Best answers
- Sum of squares c++ - 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 sum disney - Download - Puzzle
- Square root in c - Guide
- How to get rid of white square on computer screen ✓ - Monitor Forum
- We have reason to believe your account activity has violated our terms of service and decided to keep your account banned. we received a large number of complaints about your account and to protect our users' privacy, we won't disclose the nature of the complaints. unfortunately, responses to this email thread won't be read. - WhatsApp 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;
}
.........................................