Scripts de pascal

Utilizando if y else determinaremos cual es el numero mayor cual el menor o si los números son iguales, en el lenguaje pascal.

program may_men_ig;
uses
crt;
var
a,b:real;
begin
clrscr;
gotoxy(7,3);
write('escribe un numero ');
readln(a);
gotoxy(7,4);
write('escribe otro numero ');
readln(b);
if
a=b
then
begin
clrscr;
gotoxy(5,3);
writeln(a:4:2,' y ',b:4:2, ' son iguales ');
readln
end
else
if
a>b
then
begin
clrscr;
gotoxy(5,3);
writeln(a:4:2,' es mayor que ',b:4:2);
readln
end
else
begin
clrscr;
gotoxy(5,3);
writeln(a:4:2,' es menor que ',b:4:2);
readln
end
end.

 

Autor: gama DescargarDescargar

Comentarios en "El mayor, menor o igual de dos numeros en pascal"

Table 'programa_programas.t_comentarios' doesn't exist