Functions common errors

Function errors: Copying one function to create another.

Using the CelsiusToKelvin function as a guide, create a new function, changing the name to KelvinToCelsius, and modifying the function accordingly.

#include <stdio.h>

double CelsiusToKelvin(double valueCelsius) {
 double valueKelvin = 0.0;

valueKelvin = valueCelsius + 273.15;

return valueKelvin;
}

double KelvinToCelsius(double valueKelvin){
 double valueCelsius = 0.0;
 
 valueCelsius = valueKelvin - 273.15;
 
 return valueCelsius;
}

int main(void) {
 double valueC = 0.0;
 double valueK = 0.0;

valueC = 10.0;
 printf("%lf C is %lf K\n", valueC, CelsiusToKelvin(valueC));

valueK = 283.15;
 printf("%lf is %lf C\n", valueK, KelvinToCelsius(valueK));

return 0;
}