- #1
needOfHelpCMath
- 72
- 0
A user types a word and a number on a single line. Read them into the provided variables. Then print: word_number. End with newline. Example output if user entered: Amy 5
Amy_5
Amy_5
Code:
#include <iostream>
#include <string>
using namespace std;
int main() {
string userWord;
int userNum = 0;
userWord="Amy";
cout << userWord;
getline(cin,userWord);
return 0;
}
Last edited by a moderator: