fork(2) download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5. float a,b,c ;
  6. int main()
  7. {
  8.  
  9. cin >> a >>b >> c ;
  10.  
  11.  
  12.  
  13.  
  14. if (a == 0 && (c-b)==0)
  15. {
  16. cout <<"NWR" ;
  17. }
  18. else if (a == 0 && (c-b)!=0)
  19. {
  20. cout <<"BR" ;
  21. }
  22. else
  23. {
  24.  
  25. if (a==0)
  26. {
  27. cout <<"BR" ;
  28. }
  29. else
  30. {
  31.  
  32.  
  33. cout <<(round(100*(c-b)/a))/100 << endl;
  34. }
  35.  
  36.  
  37.  
  38. }
  39.  
  40.  
  41.  
  42.  
  43.  
  44. return 0;
  45. }
  46.  
Success #stdin #stdout 0s 4484KB
stdin
Standard input is empty
stdout
NWR