fork download
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8. char firstHD = 'r';
  9.  
  10. if (firstHD == 'E')
  11. {
  12. firstHD = 1;
  13. }
  14. else if (firstHD == 'e')
  15. {
  16. firstHD = 1;
  17. }
  18. else if (firstHD == 'W')
  19. {
  20. firstHD = -1;
  21. }
  22. else if (firstHD == 'w')
  23. {
  24. firstHD = -1;
  25. }
  26. else
  27. {
  28. firstHD = 0;
  29. }
  30.  
  31. cout << firstHD;
  32.  
  33. return 0;
  34. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout