Multiplication Table

Interview

Time limit1sMemory limit128 MB

Summary
Print the multiplication table for a given integer N from N*1 to N*9 in the exact required format.
Level

Easy1 of 10

Topics
Implementation
Solved
No attempts yet

Problem

Given an integer N, write a program that prints the multiplication table for N from 1 through 9, one line at a time. Each line must follow the required output format exactly.

Input

The first line contains an integer N. N is between 1 and 9, inclusive.

Output

Print the products from N * 1 through N * 9 in order. Each line has the format N * i = result.

Examples1

  1. Example 1

    Input
    2
    
    Expected output
    2 * 1 = 2
    2 * 2 = 4
    2 * 3 = 6
    2 * 4 = 8
    2 * 5 = 10
    2 * 6 = 12
    2 * 7 = 14
    2 * 8 = 16
    2 * 9 = 18