fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int firstInteger; // INPUT - first integer to be addened
  10. int secondInteger; // INPUT - second integer to be addened
  11. int total; // OUTPUT - sum of two integers
  12.  
  13. // Define the variable with given value
  14. firstInteger = 62;
  15. secondInteger = 99;
  16.  
  17. // Sum these two values
  18. total = firstInteger + secondInteger;
  19.  
  20. // Display the total of these two values.
  21. cout << "The sum of " << firstInteger << " and ";
  22. cout << secondInteger << " is " << total << endl;
  23. return 0;
  24. }
Success #stdin #stdout 0s 5312KB
stdin
#include <iostream>
using namespace std;
 
int main() {
	//Intialize numbers
	int firstNumber = 62;
	int secondNumber = 99;
 
	//Intialize sum
	int total = firstNumber + secondNumber;
 
	//Displays equation and sum of two numbers in the total integer
	cout << firstNumber << " plus " << secondNumber << " is equal to " << total;
 
	return 0;
}
stdout
The sum of 62 and 99 is 161