Skip to content

Commit 4976d97

Browse files
authored
Added solution of problem 33 Multiplication table.
1 parent a6f4403 commit 4976d97

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

C++/33_Multiplication_Table.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//Given a number N. Print the maltiplication table of the number from 1 to 12.
2+
3+
#include <iostream> //iostream is a header file which contains basic input/output functions.
4+
#include <iomanip> //iomanip is a header file which contains functions for input/output manipulations.
5+
#include <cmath> //cmath is a header file which contains mathematical functions.
6+
using namespace std;
7+
8+
int main() {
9+
int n; //Declaring variable n as integer.
10+
cin>>n; //Taking input of n.
11+
for(int i = 1; i <= 12; i++) //Looping from 1 to 12.
12+
cout << i << " x " << n << " = " << i * n << endl; //Printing i x n = i * n.
13+
return 0; //Return 0 to indicate that the program ended successfully.
14+
//End of program
15+
}

0 commit comments

Comments
 (0)