Alx09

Fb help

Oct 26th, 2021
1,113
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a, b, c, x;
  8.     cout << "a= "; cin >> a;
  9.     cout << "b= "; cin >> b;
  10.     cout << "c= "; cin >> c;
  11.     if(a > b){
  12.         x = a;
  13.         a = b;
  14.         b = x;
  15.     }
  16.     if(b > c){
  17.         x = b;
  18.         b = c;
  19.         c = x;
  20.     }
  21.     if(a > b){
  22.         x = a;
  23.         a = b;
  24.         b = x;
  25.     }
  26.     if(b == (a + c) / 2)
  27.         cout << a <<" " << b << " " << c << " sunt in progresie aritmetica";
  28.     else
  29.         cout << a <<" " << b << " " << c << "  nu sunt in progresie aritmetica";
  30.     return 0;
  31.  
  32. }
  33.  
RAW Paste Data