Write a c++ program to generate a dynamic multiplication table allow the user to specify the following;
-The type of multiplication table
-The starting point
-The ending point
// 2 * 2 = 1
// 2 * 10 = 10
#include <iostream>
int main()
{
int start, end;
std::cout << "Start:";
std::cin >> start;
std::cout << "End:";
std::cin >> end;
for (int i=start; i<=end; i++) {
for (int j=start; j<=end; j++) {
std::cout << i * j << " ";
}
std::cout << std::endl;
}
return 0;
}
Comments
Leave a comment