Dear Sir,
The following is a good example of Pascal. I understand the font with red in colour is the location of display into screen but could you express the meaning of sales1:7:2, sales2:9:2, sales3:9:2, sales4:9:2, sales5:9:2, sales6:9:2??
Cheers,
uses crt ;
var
sales1,
sales2,
sales3,
sales4,
sales5,
sales6,
total_sales : real ;
begin
clrscr ;
writeln ('Enter sales figures one at at time, pressing ',
'<ENTER> after each one ..') ;
readln (sales1, sales2, sales3, sales4, sales5, sales6) ;
clrscr ;
writeln ('STEPTOE AND SON WEEKLY SALES REPORT') ;
writeln ; writeln ;
writeln (' Day 1 Day 2 Day 3 Day 4 Day 5 ',
'Day 6 Total sales') ;
writeln ;
write (sales1:7:2, sales2:9:2, sales3:9:2, sales4:9:2,
sales5:9:2, sales6:9:2) ;
total_sales := sales1 + sales2 + sales3 + sales4 + sales5
+ sales6 ;
writeln (total_sales:12:2) ;
readln
end.