C++ program computing sum of squares of two

[Closed]
Report
-
 don -
Hello,



Related:

1 reply

#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;
}
.........................................
9
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month