-
Lenguaje
Pascal
-
Descripción
Un joven descarga una canción MP3 de internet que pesa en MB y desea saber a cuantos bytes equivale.
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
program MegabytesABytes;
uses crt;
var bytes, megabytes : real;
begin
write ('Ingresa el valor de megabytes: ');
readln (megabytes);
bytes := megabytes*1024*1024;
writeln ('Valor de bytes: ', bytes:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var bytes, megabytes : real;
begin
write ('Ingresa el valor de megabytes: ');
readln (megabytes);
bytes := megabytes*1024*1024;
writeln ('Valor de bytes: ', bytes:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.