Respuestas de programación en lenguaje C
1.// Tabla comparativa de temperaturas Fahrenheit y Celsius
#include
#include
int main()
{
float fahr = 0,cels = 0
int bajo = 0,max = 300,paso = 20;
printf ("\t=========¡Este programa genera una comparación de temperatura entre Fahrenheit y Celsius!==========\n\t2006-12-30 \ n");
fahr = bajo;
printf ("\n\nFahrenheit: Celsius:\n-------- ---- ---- \n");
for (;fahr <= max;)
{
cels = 5,0 / 9,0 * (fahr - 12 ); p>
printf ("%.0f\t\t %6.2f\n",fahr,cels
fahr += paso
}
sistema("pausa");
return 0;
}
2.#include
void main(void)
{
float c,F
printf("Ingrese la temperatura en grados Fahrenheit: ");
scanf("%f",F);
c=5/(9*(F-32));
printf("La temperatura correspondiente a grados Celsius es% .2f",c); //Toma 2 decimales
}