Question: (c++) The following code takes in a string input from the user and performs an integer multiplication, as seen in the example run here. Note
(c++) The following code takes in a string input from the user and performs an integer multiplication, as seen in the example run here. Note that the input string will contain the asterix character (i.e. *):
Enter 2 integer numbers to be multiplied, like this: num1*num2: 15*3
The answer is: 45
Complete the missing code below that performs this task (it can be done in 2 lines, but you can use more if you like).
code:
string s;
int k(0);
cout << "Enter 2 integer numbers to be multiplied, like this: num1*num2: ";
cin >> s;
cout << "The answer is: " << k << endl;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
