-
Lenguaje
Pascal
-
Descripción
Se ingresan dos números enteros, averiguar si son múltiplos entre si.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
program MultiplosEntreSi;
uses crt;
var a, b : integer;
begin
write ('Ingresa el valor de a: ');
readln (a);
write ('Ingresa el valor de b: ');
readln (b);
if (a mod b=0) or (b mod a=0) then
begin
writeln ('Los n'#163'meros son m'#163'ltiplos.');
end
else
begin
writeln ('Los n'#163'meros no son m'#163'ltiplos.');
end;
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var a, b : integer;
begin
write ('Ingresa el valor de a: ');
readln (a);
write ('Ingresa el valor de b: ');
readln (b);
if (a mod b=0) or (b mod a=0) then
begin
writeln ('Los n'#163'meros son m'#163'ltiplos.');
end
else
begin
writeln ('Los n'#163'meros no son m'#163'ltiplos.');
end;
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.