Program Menutest02;
Uses WinCrt;
Var imc,peso,altura:real;
a,b,c,op:integer;
Begin
Writeln ('***Menú del Parcial II***');
Writeln ('1-Cálculo del IMC');
Writeln ('2-Comparar tres notas de 0 a 20');
Writeln ('3-No hay más opciones');
Readln (op);
If op=1 then
Begin
Writeln ('Cálculo del IMC');
Writeln ('Ingrese peso');
Readln (peso);
Writeln ('Ingrese altura');
Readln (altura);
imc:=peso/sqr(altura);
Writeln ('El IMC es: ', imc:4:2);
If (imc>16) and (imc<19) then
Writeln ('Muy delgado')
Else
If (imc>19) and (imc<22) then
Writeln ('Delgado')
Else
If (imc>22) and (imc<25) then
Writeln ('Normal')
Else
If (imc>25) and (imc<30) then
Writeln ('Goldito')
Else
If imc>30 then
Writeln ('Controle su peso')
End;
If op=2 then
Begin
Writeln ('Comparar tres notas de 0 a 20');
Writeln ('Ingrese a');
Readln (a);
Writeln ('Ingrese b');
Readln (b);
Writeln ('Ingrese c');
Readln (c);
If (a>b) and (a>c) then
Writeln ('Mayor es A')
Else
If (b>a) and (b>c) then
Writeln ('Mayor es B')
Else
If (c>a) and (c>b) then
Writeln ('Mayor es C')
End;
If op=3 then
Begin
Writeln ('No hay más opciones');
End;
End.
Uses WinCrt;
Var imc,peso,altura:real;
a,b,c,op:integer;
Begin
Writeln ('***Menú del Parcial II***');
Writeln ('1-Cálculo del IMC');
Writeln ('2-Comparar tres notas de 0 a 20');
Writeln ('3-No hay más opciones');
Readln (op);
If op=1 then
Begin
Writeln ('Cálculo del IMC');
Writeln ('Ingrese peso');
Readln (peso);
Writeln ('Ingrese altura');
Readln (altura);
imc:=peso/sqr(altura);
Writeln ('El IMC es: ', imc:4:2);
If (imc>16) and (imc<19) then
Writeln ('Muy delgado')
Else
If (imc>19) and (imc<22) then
Writeln ('Delgado')
Else
If (imc>22) and (imc<25) then
Writeln ('Normal')
Else
If (imc>25) and (imc<30) then
Writeln ('Goldito')
Else
If imc>30 then
Writeln ('Controle su peso')
End;
If op=2 then
Begin
Writeln ('Comparar tres notas de 0 a 20');
Writeln ('Ingrese a');
Readln (a);
Writeln ('Ingrese b');
Readln (b);
Writeln ('Ingrese c');
Readln (c);
If (a>b) and (a>c) then
Writeln ('Mayor es A')
Else
If (b>a) and (b>c) then
Writeln ('Mayor es B')
Else
If (c>a) and (c>b) then
Writeln ('Mayor es C')
End;
If op=3 then
Begin
Writeln ('No hay más opciones');
End;
End.
No hay comentarios:
Publicar un comentario