# C Program to print Triad Numbers

The triad numbers is a set of three numbers which satisfy the following condition:

1. Each number must be a 3 digit number
2. All the digits in the numbers must be unique.
3. The second number must be twice the first number and the third number must be thrice the first.

Here are examples of tried numbers:

The following is a C program to print all triad numbers between 100 and 999.

Expected Output:

## How it works

2. The nested for loop (line 16) is used to check whether the digits in the first number is unique or not. If the digits are not unique we come out of the nested for loop using the `goto` statement (line 28) and move on to the next number.
3. If the digits in the first number are unique then the control comes to the for loop defined in line 33. This for loop checks whether the given three numbers have unique digits or not. If digits are unique then the numbers are triad numbers, otherwise, we come out of the nested for loop using the `goto` statement and check for the next number.