program pizza; {This works out the cost of a pizza} {Ronald Begg} uses Crt; label extra; const fixedcost = 3.75; basecost = 1.55; extracost = 0.75; var diameter,area,cost,sellingCost : real; ingred : integer; begin clrscr; {This block is my title} writeln ('------------------'); writeln ('Pizza Cost Program'); writeln ('------------------'); writeln; {input} write ('Diameter of the Pizza(cm): '); readln (diameter); diameter := diameter /100; {convert to metres} extra: write ('Number of extra ingredients: '); readln (ingred); if (ingred > 3) or (ingred < 0) then begin writeln ('Invalid number of extra ingredients, please enter 0-3'); goto extra; end; {processing} area := pi*sqr(diameter)/4; cost := fixedcost + (basecost*area) + (ingred*extracost*area); sellingcost := cost * 1.5; {output} writeln; writeln; writeln ('The total cost of this Pizza is: $',sellingCost:0:2); writeln; writeln ('Press any key to exit...'); while not keypressed do; {Waits for a key to be pressed} end.