Leia uma temperatura em Fahrenheit e apresente em Celsius
Fórmula:
C ← ( F – 32 ) x ( 5 / 9 )
Pseudocódigo:
programa exercicio10 var temp_f, temp_c : real; inicio leia temp_f; temp_c ← ( F - 32 ) * ( 5 / 9 ); escreva temp_c; fim.
Pascal:
// Autor: Rafael Oliveira
// Data: 28/12/2013
Program exercicio10;
uses crt;
var
temp_f, temp_c : real;
Begin
writeln('Insira a temperatura em Fahrenheit');
readln(temp_f);
temp_c := (temp_f - 32) * (5/9);
writeln('Temperatura em Celsius = ', temp_c:5:2, ' C');
writeln('Pressione para fechar');
readkey;
End. Veja também:
[box type=”info” align=”aligncenter” class=”” width=”100%”]
Algoritmos
[/box]