fork download
  1. // operating with variables
  2.  
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main ()
  7. {
  8. // declaring variables:
  9. int a, b;
  10. int result;
  11.  
  12. // process:
  13. a = 5;
  14. b = 2;
  15. a = a + 1;
  16. result = a - b;
  17.  
  18. // print out the result:
  19. cout << result;
  20.  
  21. // terminate the program:
  22. return 0;
  23. }
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
4