I am a beginner in Pascal.
I was wondering if anyone could tell me what is wrong with the following code:
The error message says that ; expected but else found, when there is a semi colon before else.
Program first (input, output);
write ('Enter the regular price: ');
write ('On Sale?: ');
total:= price + discount;
if (sale= 'y') or (sale= 'Y')
writeln ('Discount: ');
writeln ('Total: ');
else if (sale = 'n') or (sale= 'N')
then writeln ('Total: ', price);