-
Lenguaje
Pascal
-
Descripción
Hallar el cociente de dos números.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
program CocienteDeDosNumeros;
uses crt;
var a, b, cociente : real;
begin
write ('Ingresa el valor de a: ');
readln (a);
write ('Ingresa el valor de b: ');
readln (b);
if b<>0 then
begin
cociente := a/b;
end
else
begin
cociente := 0;
writeln ('Intederminaci'#162'n');
end;
writeln ('Valor de cociente: ', cociente:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var a, b, cociente : real;
begin
write ('Ingresa el valor de a: ');
readln (a);
write ('Ingresa el valor de b: ');
readln (b);
if b<>0 then
begin
cociente := a/b;
end
else
begin
cociente := 0;
writeln ('Intederminaci'#162'n');
end;
writeln ('Valor de cociente: ', cociente:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.