55,548 views
2 votes
2 votes
Write a C++ program to generate the multiplication table of a number (entered by

the user) using While Loop

User Geobreze
by
3.2k points

1 Answer

7 votes
7 votes

#include <iostream>

int main(int argc, char* argv[]) {

int number, c=1; std::cin>>number;

while(c<11) {

std::cout << number << "x" << c << "=" << number*c << std::endl;

c++;

}

return 0;

}

Write a C++ program to generate the multiplication table of a number (entered by the-example-1
User Ivana
by
2.9k points