program euroescmenu (input,output);
uses crt;
var
esc,euro:real;
a,b,opc:integer;
procedure clear ;
begin
a:=1;
repeat
writeln;
a:=a+1;
until a>=25
end;
procedure clear2 ;
begin
b:=1;
repeat
writeln;
b:=b+1;
until b>=9
end;
procedure eurosescudos;
begin
clear;
TextColor(black);
TextBackground(green);
writeln('Insira um valor em euros');writeln;
write('euro ->> ');
read(euro);clear;
writeln('O valor de Euro ', euro:0:0);writeln;
writeln('Cooresponde a ',(euro * 200.482):0:0,' $ 00');writeln;
readln;
end;
procedure escudoseuros;
begin
clear;
TextColor(black);
TextBackground(green);
writeln('Insira um valor em escudos');writeln;
write('esc ->> ');
read(esc);clear;
writeln('O valor de ',esc:0:0,' $ 00 ');writeln;
writeln('Cooresponde a Euro ',(esc / 200.482):2:3);writeln;
readln;
end;
procedure naoopcao;
begin
while (opc < 1) or ( opc >3) do
begin
TextColor(black);
TextBackground(green);
writeln(' op‡Æo errada !!!! ','digite de novo uma opcao entre (1 e 3)');writeln;
write(' opc ->> ');
readln(opc);
end;
end;
procedure opcao;
begin
TextColor(black);
TextBackground(green);
writeln;
writeln(' Escolha uma opcao entre (1 e 3) ');writeln;
write(' opc ->> ');
readln(opc);
naoopcao;
end;
procedure fim;
begin
clear;
TextColor(black);
TextBackground(blue);
writeln(' ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ');
writeln(' º Programa feito por º ');
writeln(' º Jos‚ Alfredo Andrade Ribeiro º ');
writeln(' º A º ');
writeln(' º 04 - 12 - 2001 º ');
writeln(' º º ');
writeln(' º Muito obrigado Voltem sempre!!!! º ');
writeln(' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
clear2;
readln;
end;
procedure menu;
begin
clear;
TextColor(black);
TextBackground(red);
writeln;
writeln(' ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ');
writeln(' º PROGRAMA DE COMVERSAO DE EUROS EM ESCUDOS º ');
writeln(' º E VICEVERSA !!!! º ');
writeln(' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ');
writeln;writeln;
writeln(' ÉÍÍÍÍÍÍÍÍÍÍ» ');
writeln(' ÉÍÍÍÍÍÍÍÍÍÍ͹ MENU ÌÍÍÍÍÍÍÍÍÍÍ» ');
writeln(' º ÈÍÍÍÍÍÍÍÍÍͼ º ');
writeln(' º º ');
writeln(' º 1 ->> Escudos / Euros º ');
writeln(' º 2 ->> Euros / Escudos º ');
writeln(' º 3 ->> Sair º ');
writeln(' º º ');
writeln(' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ');
writeln;writeln;writeln;writeln;
opcao;
end;
begin
clear;
repeat
menu;
case opc of
3:begin
TextColor(black);
TextBackground(blue);
fim;
end;
1:begin
escudoseuros;
readln;
end;
2:begin
eurosescudos;
readln;
end;
end
until (opc = 3);
end.