Related:
- Program to find sum of squares of n numbers
- Sum of squares of n natural numbers c++ - Best answers
- C program for sum of squares of n natural numbers - Best answers
- Kerbal space program free download - Download - Simulation
- End it all program - Download - Cleaning and optimization
- Coagula program - Download - Other
- Jarfix program - Download - Other
- How to run nasm program in ubuntu - Guide
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;
}
.........................................