fork download
  1. // Nicolas Ruano CS1A Chapter 2, Pp. 81, #1
  2.  
  3. /*************************************************************************
  4. *
  5. *------------------------------------------------------------------------*
  6. * Output is when the entire ,mathematical problem has been solved step by*
  7. * step *
  8. * -----------------------------------------------------------------------*
  9. * Input *
  10. * The number values that are used for perfoming the calculation *
  11. * *
  12. * Output *
  13. * The resolved anser of the mathematical calculation *
  14. *************************************************************************/
  15.  
  16. #include <iostream>
  17. using namespace std;
  18.  
  19. int main() {
  20. //One cout line
  21. // Store the integers in variables
  22. int num1 = 62;
  23. int num2 = 99;
  24.  
  25. // Calculate the sum and store it in 'total'
  26. int total = num1 + num2;
  27.  
  28. // Print the result
  29. cout << "The sum is: " << total << endl;
  30.  
  31. return 0;
  32. }
  33.  
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
The sum is: 161