**Day 5 Problem Statement**

Given an integer,n, print its first **10** multiples. Each multiple **n * i **(where * 1<=i<=10*) should be printed on a new line in the form:

*.*

**n x i = result****Input Format**

A single integer, * n*.

**Constraints**

`2<=n<=20`

**Output Format**

Print **10** lines of output; each line i(where **1<=i<=10**) contains the result of * n * i* in the form:

*n x i = result*.

**Sample Input**

`2`

**Sample Output**

```
2 x 1 = 2
2 x 2 = 4
2 x 3 = 6
2 x 4 = 8
2 x 5 = 10
2 x 6 = 12
2 x 7 = 14
2 x 8 = 16
2 x 9 = 18
2 x 10 = 20
```

**For Loop Syntax**

**Code Explanation**

Here **n** is an integer number we have to print the table of **n**, first take user input and store the value in ‘**n**‘. after that use a ‘**for loop**‘ and put the three condition in ‘**for loop**‘. Below is a for loop syntax.

So according to above syntax take a user input, and initialize the loop with ** i = 0** and put the condition

**and last condition is**

*i <= 10***i++**or

**i =i+1**.And multiplication

*i*and

**and print the result is according to the problem statement.**

*n*```
for(initialization ; condition ; increament / decreament)
{
---
---
Executable statements
---
---
}
```

Below is the Solution in all majors 3 language, C, C++, and Java. So according to choice go through the solutions and try to understand the code. If you feel any difficulty comment below or contact us on our social media profiles.

**Day 5 Loops Hackerrank Solution in** Python

```
N = int(input())
for i in range(1, 11):
print(str(N) + " x " + str(i) + " = " + str(N * i))
```

**Loops Hackerrank Solution in Java** :

```
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
in.close();
for (int i = 1; i < 11; i++) {
System.out.println(N + " x " + i + " = " + N * i);
}
}
}
```