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

+1 vote
asked Sep 19, 2019 by Jemund Burke (160 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);


1 Answer

0 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

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.