fork(2) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main()
  5. {
  6. float x;
  7. float a;
  8. float b;
  9. float c;
  10.  
  11. cin>>a>>b>>c;
  12.  
  13. if(a!=0)
  14. {
  15. x=(c-b)/a;
  16. cout.precision(2);
  17. cout<<fixed<< x;
  18. }
  19. else
  20. if(b==c)
  21. cout<<"NWR";
  22. else
  23. cout<<"BR";
  24.  
  25. return 0;
  26. }
  27.  
  28.  
  29.  
  30.  
  31. /* /usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../lib/crt1.o: In function `_start':
  32.   (.text+0x18): undefined reference to `main'
  33.   collect2: ld returned 1 exit status */
  34.  
Success #stdin #stdout 0s 2856KB
stdin
Standard input is empty
stdout
0.92