fork download
  1. //Ryan Shahriyarpour CS1A Carl Argila CH2 HW Q:1
  2. //
  3. /*****************************************************************************
  4.  *
  5.  * Computing the sum of 2 numbers
  6.  *
  7.  *
  8.  * *******
  9.  * The goal of the progam is to compute the sum of two integers, 62 and 99, and
  10.  * store the sum in a varible.
  11.  *
  12.  *
  13.  * In order to find this, the progam will compute the following:
  14.  * Total = num1 + num2
  15.  *
  16.  *
  17.  * *******
  18.  *
  19.  * INPUT
  20.  * number 1 : Integer one: 62
  21.  * number 2 : Integer two: 99
  22.  *
  23.  * OUTPUT
  24.  * total = : The total of the two integers
  25.  *
  26.  *
  27.  ****************************************************************************/
  28.  
  29.  
  30. #include <iostream>
  31.  
  32. int main() {
  33. // Specify the numbers and assign them a variable
  34. int num1 = 62;
  35. int num2 = 99;
  36.  
  37. // Compute the total and store them in a variable
  38. int total = num1 + num2;
  39.  
  40. // Show the output
  41. std::cout << "The total is " << total << std::endl;
  42. return 0;
  43. }
Success #stdin #stdout 0s 5308KB
stdin
Standard input is empty
stdout
The total is 161