fork download
  1. //Eesha Tangirala CS1A Chapter 2, P. 81, #1
  2.  
  3. //Calculate Integers
  4.  
  5. //Add 2 integers to find the total
  6.  
  7. //Input: 2 Integers
  8. //Output: Total
  9.  
  10. #include <iostream>
  11. #include <iomanip>
  12. using namespace std;
  13.  
  14. int main() {
  15. //Integer 1
  16. int x = 62;
  17.  
  18. //Integer 2
  19. int y = 99;
  20.  
  21. //Calculate total
  22. int Total = x + y;
  23.  
  24. //Display results
  25. cout << "Total: " << Total << endl;
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Total: 161