Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Modify the program so that it uses a void function to display the multiplication

ID: 3534287 • Letter: M

Question

Modify the program so that it uses a void function to display the multiplication table.



#include <iostream>

using namespace std;


int main()

{

//declare variables

int multiplicand =0;

int product =0;

  

cout << "Multiplicand (negative number to end): ";

cin >> multiplicand;

  

while (multiplicand >= 0)

{

for (int multiplier =1; multiplier <10;

   multiplier += 1)

{

product = multiplicand * multiplier;

cout << multiplicand << " * "

<< multiplier << " = "

<< product << endl;

} //end for


cout << endl;

cout << "Multiplicand (negative number to end): ";

cin >> multiplicand;

} //end while

  

system ("pause");

return 0;

} //end of main function


Explanation / Answer

http://ideone.com/uIeEgB

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote