• Lenguaje

    Pascal

  • Descripción

    Convertir una cantidad de grados Fahrenheit a Celsius y Kelvin.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
program GradosFahrenheitACelsiusYKelvin;
uses crt;

var grados_Celsius, grados_Fahrenheit, grados_Kelvin : real;
begin
    write ('Ingresa el valor de grados Fahrenheit: ');
    readln (grados_Fahrenheit);
    grados_Celsius := (grados_Fahrenheit-32)/1.8;
    grados_Kelvin := grados_Celsius+273.15;
    writeln ('Valor de grados Celsius: ', grados_Celsius:0:6);
    writeln ('Valor de grados Kelvin: ', grados_Kelvin:0:6);
    writeln;
    write ('Presiona una tecla para terminar . . . ');
    readkey;
end.