Help me please. PascalABC

Given the age of the person in years (0..99 years). Write a program that calls age in English. For example: if you enter "1", then the program should give out - "1 year", if you enter "22", then the program should give out - "22 years", if you enter “45”, then the program should display “45 years”, and so for each number in the range from 0 to 99. It is allowed to use no more than 5 IF statements in the program.

Respuesta :

Answer:

Program Print_Out_Number_as22_years;

Var      

   i : Integer;

Begin

For i := 1 to 100 do

Begin

 If (i < 100) Then

 Begin

  WriteLn(i , 'years');

 End;

End;

End.

Explanation:

The above program is in Pascal, and it will output 0 to 99, as 0 years, ... 99 years. And this is what is required.