Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
![]() |
•
•
Join Date: Sep 2005
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
i just started a pascal programming class. so what i am trying to do is write a program that will allow me to change my weight (in stones) to kilograms and change my hight (in inches) to kilograms. i also need to be able to enter my name in. i have everything done perfect from what i can tell. but i keep getting this error that sais "expected but identifier write found" on line 9 colum 2.i'v been working on this through out the day but with no luck, what so ever. i did read your rules on the homework help policy so if you can't tell me what is wrong with the program then could you at least tell me what that error code means. thanks in advance
Var name: real;
weight1: real;
hight1: real;
sum1: real;
sum2: real;
Begin
write('Enter your name:');
readln(name);
write('Enter your weight in stones:');
readln(weight1);
write('Enter your hight in inches:');
readln(hight1)
sum1 :=weight1 * 6.63 ;
sum2 :=hight1 * 2.54;
Writeln('Your name is',name);
writeln('Your weight in kilograms is',weight2:2:2);
writeln('and your hight in inches is',hight2:2:2);
Readln;
End.
Var name: real;
weight1: real;
hight1: real;
sum1: real;
sum2: real;
Begin
write('Enter your name:');
readln(name);
write('Enter your weight in stones:');
readln(weight1);
write('Enter your hight in inches:');
readln(hight1)
sum1 :=weight1 * 6.63 ;
sum2 :=hight1 * 2.54;
Writeln('Your name is',name);
writeln('Your weight in kilograms is',weight2:2:2);
writeln('and your hight in inches is',hight2:2:2);
Readln;
End.
•
•
Join Date: Apr 2004
Location: in a galaxy far far away :)
Posts: 121
Reputation:
Rep Power: 5
Solved Threads: 0
first error i see is that to readln a name you should use a char array.And you should not forget that real is for numbers ...And at the very top you should write
Program project1 (Input,Output); teling the pc you have inputs and outputs....And I thınk you should writeln instead of write....himmm thats all i see for now i don't have my compiler next to me now but i think this will work.Please inform me of the result....
Program project1 (Input,Output); teling the pc you have inputs and outputs....And I thınk you should writeln instead of write....himmm thats all i see for now i don't have my compiler next to me now but i think this will work.Please inform me of the result....
------
"A rational anachist believes that concepts such as 'state' and 'society' and 'government' have no existence save as physically exemplified in acts of self-responsible individuals.He believese that it is impossible to shift blame,share blame,distrubute blame.... as blame,guilt,responsibility are matters taking place inside human beings singly and nowhere else.But being rational,he knows that not all individuals hold his evaluations,so he tries to live perfectly in an imperfectworld...aware that his effort wil be less than perfect yet undismayed by self-knowledge of self-failure."
-Robert A. Heinlein
-----
John Roach
"A rational anachist believes that concepts such as 'state' and 'society' and 'government' have no existence save as physically exemplified in acts of self-responsible individuals.He believese that it is impossible to shift blame,share blame,distrubute blame.... as blame,guilt,responsibility are matters taking place inside human beings singly and nowhere else.But being rational,he knows that not all individuals hold his evaluations,so he tries to live perfectly in an imperfectworld...aware that his effort wil be less than perfect yet undismayed by self-knowledge of self-failure."
-Robert A. Heinlein
-----
John Roach
![]() |
Similar Threads
Other Threads in the ASP.NET Forum
- help with pascal! (Pascal and Delphi)
- using pascal to write ulam sequence (Pascal and Delphi)
- do while; if else? am I using the right code for the problem? (C++)
Other Threads in the ASP.NET Forum
- Previous Thread: disable pager link buttons
- Next Thread: dynamic tables
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





:lol:
Linear Mode