Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Convertidor de Grados Celsius a Fahrenheit/Kelvin/Rankine*/
- #include <stdio.h>
- int main(){
- float Celsius, a = 1.8 /*=9/5*/, b = 32, c = 273.15, d = 491.67, Fahrenheit, Kelvin, Rankine;
- printf("Digita el valor de grados en Celsius:");
- scanf("%f",&Celsius);
- Fahrenheit = (a*Celsius)+b;
- Kelvin = c+Celsius;
- Rankine = (Celsius*a)+d;
- printf("%.1f ª Fahrenheit = %.1f ª Celsius",Fahrenheit,Celsius);
- printf("\n%.1f Kelvin = %.1f ª Celsius",Kelvin,Celsius);
- printf("\n%.1f Rankine = %.1f ª Celsius",Rankine,Celsius);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment