forked from Shubhamlmp/Programming-Practice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path33_Multiplication_Table.cpp
More file actions
15 lines (13 loc) · 877 Bytes
/
33_Multiplication_Table.cpp
File metadata and controls
15 lines (13 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Given a number N. Print the maltiplication table of the number from 1 to 12.
#include <iostream> //iostream is a header file which contains basic input/output functions.
#include <iomanip> //iomanip is a header file which contains functions for input/output manipulations.
#include <cmath> //cmath is a header file which contains mathematical functions.
using namespace std;
int main() {
int n; //Declaring variable n as integer.
cin>>n; //Taking input of n.
for(int i = 1; i <= 12; i++) //Looping from 1 to 12.
cout << i << " x " << n << " = " << i * n << endl; //Printing i x n = i * n.
return 0; //Return 0 to indicate that the program ended successfully.
//End of program
}