Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# asks to put a   ")" and not at end

Posted on 2000-04-02
Medium Priority
179 Views
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
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

LVL 2

Accepted Solution

yairy earned 20 total points
ID: 2678359
as 2..9 = 8 items.
Count to items and see that eighty is
the 8'th.
0

Author Comment

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

## Featured Post

Question has a verified solution.

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

Working from home is a dream for many people who aren’t happy about getting up early, going to the office, and spending long hours at work. There are lots of benefits of remote work for employees.
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
###### Suggested Courses
Course of the Month8 days, 16 hours left to enroll