Write a C++ program using a nested for loop to create multiplication table.
sample Output:
1 2 3 4 5 6 7 8 9 10
6
7
8
9
10
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout<<"Multiplication table"<<endl;
for(int i=1; i<=10; i++){
for(int j=1; j<=10; j++){
cout<<"\t"<<i*j;
}
cout<<"\n";
}
system("pause");
return 0;
}
Comments
Leave a comment