mramine364

Socles pour statues

Feb 10th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int max,min,s=0;
  8.     cin >> max; cin >> min;
  9.     for(int i=min;i<=max;i++)
  10.     {
  11.         s += i*i;
  12.     }
  13.     cout << "sol: " << s << endl;
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment