Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  restaurante[
Language: PASCAL
Code:
program HelloWorld;
var
 op: char;
 reservar: array[1..40] of boolean;
 mesa: array[1..40] of integer;

begin

for reservar[mesa]:=1 to 40 do
reservar[mesa]=false;

clrscr;  

  
    write('Digite a mesa para ser reservada: ')
read(mesa);
 if reservar[mesa]=false then
      begin
     reservar[mesa]= true
write('mesa ',mesa,' reservada com sucesso!!!');
end

else
write('Mesa já reservada');

         

end.          
          
Comments: