Advertisement
Sunt_tare

Untitled

Nov 5th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int R , G , B;
  9.     cin >> R >> G >> B;
  10.     if(R>=0&&G>=0&&B>=0&&R<=255&&G<=255&&B<=255){
  11.         if(abs(R-G)<=10&&abs(R-B)<=10&&abs(G-B)<=10)
  12.             cout << "GRI";
  13.         else
  14.             cout << "CULOARE";
  15.     }
  16.     else cout << "NU E CULOARE";
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement