Related:
- Write a c++ program to find the sum of two numbers
- Sum of squares c++ - Best answers
- Write a c++ program that prints sum of squares of integers from 1 to 10 - Best answers
- How to write ' on keyboard - Guide
- Kerbal space program free download - Download - Simulation
- Free word processing program - Guide
- End it all program - Download - Cleaning and optimization
- Download program winrar - Download - File decompression
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;
}
.........................................