I am a complete newbie to the world of programming and I need some help in the creation of this program. This is a homework assignment, I just need someone to tell me what to put in the procedures part because it seems like he wants most of the commands in the main program and there;s nothing left for the procedures. Unless I'm looking at this the wrong way and he posted the procedure instead and it's not the main program...please help!!!
[pascal]program evenGame;
var bet: integer; { the amount bet by the user }
amount: integer; { the amount won or lost }
num: integer; { the random number }
win: boolean; { win = true or false }
{ insert your "even" procedure here }
begin
write('How much would you like to bet? ');
readln(bet);
{ Add 2 lines here to }
{ create a random number, 1 to 36 }
even(num,bet,win,amount);
writeln('The number is: ', num);
{ Add an If Statement which uses writeln statements }
{ to print a winning or losing message. }
{ Hint: test the value of the "win" variable. }
end.[/pascal]
[size=9px]BBCode pascal tags added by moderator during clean-up.[/size]
Bookmarks