Solved

asks to put a   ")" and not at end

Posted on 2000-04-02
2
162 Views
Last Modified: 2010-05-18
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.

0
Comment
Question by:kazooie21
2 Comments
 
LVL 2

Accepted Solution

by:
yairy earned 5 total points
ID: 2678359
because you defined your array
as 2..9 = 8 items.
Count to items and see that eighty is
the 8'th.
0
 

Author Comment

by:kazooie21
ID: 2678448
I reset it to [0..9]
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to delete from listbox using edit box 6 301
Delphi: Read a array of strings in a OleVariant 4 1,195
Youtube stream inside Delphi 1 1,545
Pascal equivalent of VB Select/case 3 343
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question