Link to home
Start Free TrialLog in
Avatar of kazooie21
kazooie21

asked on

asks to put a ")" and not at end

Ok, here's my program:

var i: integer;

type string10 = string[10];

const
  ones: array[0..9] of string10 = ('','one','two','three','four','five','six','seven','eight','nine');
  tens: array[2..9] of string10 = ('','twenty','thirty','forty','fifty','sixty','seventy','eighty','ninety');


function wordnumber (number: word) : string;
  begin
     wordnumber:= tens [number div 10] + '-' +ones [number div 10];
  end;

begin {main}
   for i:= 20 to 99 do
       writeln ('You write ' i, ' like this: ', wordnumber(i));
end.

Why does it ask me to put a "(" at the comma after the 'eighty'? It's not at the end of the line.

ASKER CERTIFIED SOLUTION
Avatar of yairy
yairy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kazooie21
kazooie21

ASKER

I reset it to [0..9]