lol no worries. all I know about variables is that it's a memory location. I'm on chapter 1 of this book and my teacher hasn't taught us anything yet. Last week was just orientation and somehow I'm supposed to write these programs. I wrote 3 already, this is the only one I'm having trouble with.
Yes you would. You use cin to get input, and cout to output. For example:
1 2 3 4 5 6 7
int n = 9; //n initialized to 9
std::cin >> n; //Now the user will be prompted to provide input
//Let's say you type in 37 for the input
std::cout << n; //Now the value stored in n will be outputted to your terminal.
//Note the different operators here. << is the insertion operation, while >> is the extraction operator. In C days these meant something entirely different, but C++ offers something called operator overloaded. Don't worry about any of that right now, just keep in
//mind that to output you will use << and to get input you will use >>