Tried with array pls.. help me - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Tried with array pls.. help me

tazone123tazone123 ThailandPosts: 1Member
edited February 2014 in Pascal

First.. i need to make a icecream shop program and i don't know what to do at

the input ... i want my program to output the price, icecreamcode, sub pls help me.. sorry for bad english.

this is my program

program Icecreams;
uses crt;

label
loop;

const
HFS = 79;
CCY = 79;
BBS = 69;
MOC = 69;
CLS = 69;
CFS = 69;
HFB = 129;
SCC = 129;
CTR = 129;
FFT = 159;
TPB = 109;
STE = 109;
ORE = 109;
CBN = 109;
TEQ = 399;
CFD = 299;
CE = 15;
FD = 15;
CY = 10;
OO = 10;
CL = 10;
WC = 10;
BB = 10;
HF = 10;
SY = 10;
AD = 10;
FN = 10;
BE = 50;
WE = 50;

var
choice : integer;
MENUS,count,choices : string;

procedure rule;
begin
clrscr;
gotoxy (16,3);
writeln(' RULE');
writeln;
writeln(' 1. Please use certain letter');
writeln(' EXAMPLE RIGHT IS BBS1 not BbS1');
writeln;
writeln(' 2. Dont input any thing none-coded');
writeln;
textcolor(red+blink);
writeln(' To add more RULE contract Programmer');

readln;
end;

procedure menucode;
begin
clrscr;
gotoxy (16,3);
writeln(' MENU CODE');
writeln;
writeln(' ICECREAM TOPPING');
writeln;
writeln(' Hot fudge super Sunday 79 bath = HFS Cherrydip 15 bath = CE');
writeln(' Chewy chocky 79 bath = CCY Fandip 15 bath = FD');
writeln(' BlueBerry Sunday 69 bath = BBS Cherry 10 bath = CY');
writeln(' Coffee Sunday 69 bath = CFS Fan 10 bath = FN');
writeln(' Chockcolate Sunday 69 bath = CLS Almond 10 bath = AD');
writeln(' Mocca Chockco 69 bath = MOC Strawberry 10 bath = SY');
writeln(' Hot Fudge Bonanza 129 bath = HFB Hotfudge 10 bath = HF');
writeln(' Super Chockco 129 bath = SCC Blueberry 10 bath = BB');
writeln(' Fongdu For two 159 bath = FFT Whipcream 10 bath = WC');
writeln(' Oreo brownie 109 bath = ORE Brownie 50 bath = BE');
writeln(' Caramel banana 109 bath = CBN Waffle 50 bath = WE');
writeln(' Coit tower 129 bath = CTR Caramel 10 bath = CL');
writeln(' Strawberry stripe 109 bath = STE Oreo 10 bath = OO');
writeln(' Triple blueberry 109 bath = TPB');
writeln(' The eartquake 399 bath = TEQ');
writeln(' Chockcolate Fondu 299 bath = CFD');
readln;
end;

procedure mainprogram;
begin
write ('What do you want?');
readln;
end;

begin
clrscr;
gotoxy (16,3);
writeln (' SWENSEN MENU CHOOSE');
writeln;
writeln (' ----------------------------------------------');
writeln (' บ Open Manual Press 1 ( For employee ) บ');
writeln (' บ List of Menu Press 2 บ');
writeln (' บ Program Press 3 บ');
writeln (' -----------------------------------------------');
writeln;
write (' Menu Select = ');
readln(choice);
case choice of
1 : rule;
2 : menucode;
3 : mainprogram;
end;
end.

And i'm stuck on the procedure mainprogram... thank you very much!

Comments

  • ackelklackelkl Posts: 3Member

    Did you really write your script with this structure organization ?
    Because, it's quite hard to understand your program, if your structure sucks.

Sign In or Register to comment.