2017-05-13 19:06:25 -07:00
|
|
|
#include<iostream>
|
|
|
|
|
|
|
|
//use cout and cin to print some stuff and get input
|
|
|
|
|
|
|
|
int main(){
|
|
|
|
/*
|
|
|
|
* All of these "<<" are going into std::cout
|
|
|
|
* the "endl" forces a flush
|
|
|
|
* note that is "l" as in "line" not "1" as in "one"
|
|
|
|
*/
|
|
|
|
std::cout << "Enter two numbers: "<< std::endl;
|
|
|
|
|
|
|
|
int input_1;
|
|
|
|
int input_2;
|
|
|
|
input_1 = 0;
|
|
|
|
input_2 = 0;
|
2017-05-13 19:08:35 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* For some reason this is deliminated by spaces
|
|
|
|
* if only one number is given, it will wait for another input
|
|
|
|
*/
|
2017-05-13 19:06:25 -07:00
|
|
|
std::cin >> input_1 >> input_2;
|
|
|
|
|
2017-05-13 19:08:35 -07:00
|
|
|
/*
|
|
|
|
* formated for legability
|
|
|
|
* we are putting all those things into std::cout in the order they appear
|
|
|
|
*/
|
2017-05-13 19:06:25 -07:00
|
|
|
std::cout << "The numbers "
|
|
|
|
<< input_1
|
|
|
|
<< " and "
|
|
|
|
<< input_2
|
|
|
|
<< " add together to make "
|
|
|
|
<< input_1 + input_2
|
|
|
|
<< std::endl;
|
|
|
|
}
|