Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.  
  6.     cout << "nombre 1";
  7.     int a;
  8.     cin >> a;
  9.     cout << "nombre 2 ";
  10.     int b;
  11.     cin >> b;
  12.     int summe = 0;
  13.     for (int i = a; i > b; i--) {
  14.         summe = (i*i) + summe;
  15.  
  16.     }
  17.     summe = summe + (b*b);
  18.     cout << "summe = " << summe << endl;
  19.     system("PAUSE");
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement