SHARE
TWEET

Untitled

a guest Nov 9th, 2019 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void coutResult(int t);
  6. void init(int& a, int& b, int& c);
  7. int result(int a, int b, int c);
  8.  
  9. int main() {
  10.     int a, b, c;
  11.     init(a, b, c);
  12.     int t = result(a, b, c);
  13.     coutResult(t);
  14. }
  15.  
  16. void init(int& a, int& b, int& c) {
  17.     cin >> a >> b;
  18.     c = 180 - (a + b);
  19. }
  20. int result(int a, int b, int c) {
  21.     if (a == 90 || b == 90 || c == 90) {
  22.         if (a == 45 || b == 45 || c == 45) return 0;
  23.         else return 1;
  24.     }
  25.     if (a > 90 || b > 90 || c > 90) return 2;
  26.     return 3;
  27. }
  28.  
  29. void coutResult(int t) {
  30.     cout << t;
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top