Solved

asks to put a   ")" and not at end

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
A Short Story about the Best File Recovery Software – Acronis True Image 2017
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 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

20 Experts available now in Live!

Get 1:1 Help Now