fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. string relacja,pom,pom2,a,b;
  6. while(cin>>pom>>relacja>>pom2)
  7. {
  8. a=pom;
  9. b=pom2;
  10. if(pom.length()>1000 || pom2.length()>1000)
  11. {
  12. break;
  13. }
  14. if(relacja == "==")
  15. {
  16. if (a==b)
  17. {
  18. cout<<"1"<<endl;
  19. }
  20. else
  21. {
  22. cout<<"0"<<endl;
  23. }
  24. }
  25. else if(relacja == "!=")
  26. {
  27. if (a != b)
  28. {
  29. cout<<"1"<<endl;
  30. }
  31. else
  32. {
  33. cout<<"0"<<endl;
  34. }
  35. }
  36. else if(relacja == ">=")
  37. {
  38. if (a >= b)
  39. {
  40. cout<<"1"<<endl;
  41. }
  42. else
  43. {
  44. cout<<"0"<<endl;
  45. }
  46. }
  47. else if(relacja == "<=")
  48. {
  49. if (a <= b)
  50. {
  51. cout<<"1"<<endl;
  52. }
  53. else
  54. {
  55. cout<<"0"<<endl;
  56. }
  57. }
  58. }
  59. }
Success #stdin #stdout 0.01s 5568KB
stdin
Standard input is empty
stdout
Standard output is empty