All problems

Problem 772

Multiplication Table

Easy · 10 pts · Basics, Loops

Problem

Print the multiplication table of a number N, from N × 1 up to N × 10. Each line has the form 'N x i = P', where i goes from 1 to 10 and P is the product. Use exactly one space around 'x' and '=' as shown. This is a classic first exercise for loops: one loop from 1 to 10 that prints one line per step.

Input

A single integer N.

Output

Print 10 lines in the form 'N x i = P'.

Constraints

-1000 <= N <= 1000

Example input

3

Example 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

Explanation

For N = 3 the lines are 3 x 1 = 3, 3 x 2 = 6, and so on up to 3 x 10 = 30.

Every problem here can be used in a RelayTrixCode team match. Create a room.

Previous: Sum of Even Numbers up to N Next: Count Digits