Answer to Question #344261 in C++ for king

Question #344261

write a C++ program that gets a number from user. according to given number program should calculate and display the multiplication table of given number as shown as below in the function"void multiplicationTable";


1
Expert's answer
2022-05-24T13:54:34-0400
#include <iostream>

using namespace std;

void multiplicationTable(int value)
{
	for (int i = 1; i <= 10; i++)
	{
		cout << i<<" x "<<value<<" = "<<value*i << endl;
	}
}

int main()
{
	int v;
	cout << "Please, enter a value for multiplication table: \n";
	cin >> v;
	multiplicationTable(v);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS