Advertisement
a53

CheckColor

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