fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int i = 15;
  8.  
  9. if (i%2 == 0)
  10. cout << i << " is even." << endl;
  11. else
  12. cout << i << " is odd." << endl;
  13.  
  14. if (i%5 == 0)
  15. cout << i << " is divisible by 5." << endl;
  16. else
  17. cout << i << " is not divisible by 5." << endl;
  18.  
  19. if (i < 20)
  20. cout << i << " is smaller than 20." << endl;
  21. else
  22. cout << i << " is greater or equal than 20." << endl;
  23.  
  24. if (i*2 > 25)
  25. cout << i << "*2 is greater than 25." << endl;
  26. else
  27. cout << i << "*2 is smaller or equal than 25." << endl;
  28.  
  29. return 0;
  30. }
Success #stdin #stdout 0.02s 2680KB
stdin
Standard input is empty
stdout
15 is odd.
15 is divisible by 5.
15 is smaller than 20.
15*2 is greater than 25.