Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. int r, g, b;
  8.  
  9. int main()
  10.  
  11. {
  12.  
  13.    cin >> r >> g >> b;
  14.  
  15.    if (r >= 0 && r <= 255 && g >= 0 && g <= 255 && b >= 0 && b <= 255)
  16.  
  17.        if (abs(r - g) <= 10 && abs(r - b) <= 10 && (g - b) <= 10)
  18.  
  19.            cout << "GRI";
  20.  
  21.        else cout << "CULOARE";
  22.  
  23.    else cout << "NU E CULOARE";
  24.  
  25.    return 0;
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement