Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

why am i getting a command line error (pascal) please help trying to learn

+2 votes
asked Sep 19, 2019 by Jemund Burke (170 points)
program Test;
var N1, N2, N3, Sum:integer;

begin write ('please enter the first number');
readln (N1);
write ('please enter the first number');
readln (N2);
write ('please enter the third number');
readln (N3);
Sum:= N1 + N2 + N3;
write ('you carefully calculated answer', Sum);

end

2 Answers

+2 votes
answered Sep 21, 2019 by Maxie

Hello there,

I have no knowledge on Pascal, but, after reading up from here, I noticed the following:

A program in Pascal starts with the reserved word 'Program' (although it is not explicitly required) and ends with 'End', following a full stop (this is required though).

After implementing the above advice, I had compiled it through OnlineGDB once again, and it compiles and runs well.  smiley

commented Dec 8, 2020 by Dgi (120 points)
yes, correct
0 votes
answered Aug 28, 2021 by abd11a (260 points)

Woud you believe you forgot the full-stop after the last end?  Supposed to be "end."

program Test;
var N1, N2, N3, Sum:integer;

begin write ('please enter the first number');
readln (N1);
write ('please enter the first number');
readln (N2);
write ('please enter the third number');
readln (N3);
Sum:= N1 + N2 + N3;
write ('you carefully calculated answer', Sum);

end.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...