Multiplication table
EasyBasics
Print the multiplication table of n: ten lines, from n x 1 to n x 10, each in the form n x i = product.
Input
One line with n.
Output
Ten lines such as 3 x 4 = 12, with one space on each side of x and =.
Constraints
- 1 ≤
n≤ 1000
The input is read for you. The starter code puts it in variables; write your code under Your code here and print the answer. Changed the code already? Reset () brings the starter back.
Example 1
Input
3
Output
3 x 1 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 3 x 10 = 30
Why:
Each line multiplies 3 by the next number from 1 to 10.
Hints
Was this a good challenge?
- Solved by
- 0
- Submissions
- 0
- Accepted
- –