How to convert Fahrenheit to Kelvin in C

1 Answer

0 votes
#include <stdio.h>
 
int main() {
    int fahrenheit = 3;
     
    float kelvin = (fahrenheit - 32) * 5 / 9.0 + 273.15;
     
    printf("Kelvin = %f\n", kelvin);
}
 
 
         
/*
run:
 
Kelvin = 257.038879
      
*/

 



answered Dec 14, 2024 by avibootz
edited Dec 14, 2024 by avibootz

Related questions

1 answer 123 views
1 answer 113 views
1 answer 78 views
78 views asked Dec 14, 2024 by avibootz
1 answer 125 views
1 answer 105 views
1 answer 86 views
1 answer 84 views
...