Need help in making a program for a meal plan and adding meal cost and displaying that information. I need to store number of guests in an array with their name and meal typy 'V' for vegetarian and 'N' for non vegetarian , this data must me stored in an array . can anyone help me to complete this program, m sort of stuck this is what i have so far .
Program WeddingGuests (input,output);
Var
mealpreference:array[1..500]of char;
guests:array[1..500] of string;
costV:real;
costN:real;
totalguest:integer;
g:integer;
i:char;
V:char;
N:char;
Begin
Writeln('Enter total number of invited guests');
Readln( totalguest);
For g:=1 to totalguest do
Writeln ('enter meal preference');
Readln ( i);
If( i ='V') OR (i = 'N') then
mealpreference[g]:= i
Else
Writeln('invalid meal type re-enter until valid');
End.{end else}
End;{endif}
End;{end for}
If (i:='V')then
costV:= costV * 35
Else
(meal preference:='N') then
costN:= costN * 40
End; {endif}
End; {end else}
Total cost :=costN + costV
Writeln('Enter name of guests')
Readln (guest)
If (guests[g] <> guests) then
Wrieln('sorry your name does not appear leave!')
Else
Writeln('Welcome to the wedding please enjoy!')
End; {endif}
End; {end else}
End.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.