my assignment is to write a program that asks for a temperature in celcius, then spits out a value in fahrenheit, kelvin and reaumur.
This is what i have done:
Now the lecture want me to rewrite the code using either " ?: ". i'm not sure how this ?: actually works. Could someone please explain to me ??
float Fahr, Kelvin, Reamur;
printf(" Celcius >> ");
Fahr = (Temp * 9/5) + 32;
Reamur = Temp * 0.8;
Kelvin = Temp + 273 ;
printf("\n Fahrenheit >> %f\n", Fahr);
printf("\n Reamur >> %f\n", Reamur);
printf("\n Kelvin >> %f\n", Kelvin);
Thx in advanced