SuperCiberloco

Convertidor de Grados Celsius a Fahrenheit/Kelvin/Rankine.c

Dec 6th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1. /*Convertidor de Grados Celsius a Fahrenheit/Kelvin/Rankine*/
  2. #include <stdio.h>
  3.  
  4. int main(){
  5.  float Celsius, a = 1.8 /*=9/5*/, b = 32, c = 273.15, d = 491.67, Fahrenheit, Kelvin, Rankine;
  6.  printf("Digita el valor de grados en Celsius:");
  7.  scanf("%f",&Celsius);
  8.  Fahrenheit = (a*Celsius)+b;
  9.  Kelvin = c+Celsius;
  10.  Rankine = (Celsius*a)+d;
  11.  
  12.  printf("%.1f ª Fahrenheit = %.1f ª Celsius",Fahrenheit,Celsius);
  13.  printf("\n%.1f Kelvin = %.1f ª Celsius",Kelvin,Celsius);
  14.  printf("\n%.1f Rankine = %.1f ª Celsius",Rankine,Celsius);
  15.  
  16.  return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment