Solved

asks to put a   ")" and not at end

Posted on 2000-04-02
2
170 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

696 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