Advertisement
Positive-

Dėžutės

Jan 10th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a1, b1, c1, a2, b2, c2, v1, v2;
  8.  
  9.     cout << "Iveskite matmenis a1, b1 ir c1: "<<endl;
  10.     cin>> a1 >> b1 >> c1;
  11.     cout << "Iveskite matmenis a2, b2 ir c2: "<<endl;
  12.     cin>> a2 >> b2 >> c2;
  13.  
  14.     v1 = a1+b1+c1;
  15.     v2 = a2+b2+c2;
  16.  
  17.     if (v1-v2+v1<v2-v1-v1) cout <<"Pirmoji telpa antrojoje"<< endl;
  18.     else if (v1-v2+v1>v2-v1+v1) cout <<"Antroji telpa pirmojoje"<< endl;
  19.     else if (v1==v2) cout <<"Abi vienodu matmenu"<< endl;
  20.     else cout << "Nepalyginamos" << endl;
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement