Solved

asks to put a   ")" and not at end

Posted on 2000-04-02
2
151 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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 unescape(decode) an encoded string? 5 1,353
Enable/Disable the Windows 7 'START' button 9 1,455
Problems in integrating VCL & FireMonkey via a FM DLL 4 598
Conversion ? 15 88
What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now