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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!