#include <stdio.h>
#define CELSIUS_TO_FAHRENHEIT(celsius) ((9.0 / 5.0) * (celsius) + 32.0)
int main() {
float temp_celsius, temp_fahrenheit;
// Input the temperature in Celsius
printf("Enter temperature in Celsius: "); scanf("%f", &temp_celsius
);
// Convert Celsius to Fahrenheit using the macro
temp_fahrenheit = CELSIUS_TO_FAHRENHEIT(temp_celsius);
// Output the temperature in Fahrenheit
printf("%.2f Celsius is %.2f Fahrenheit\n", temp_celsius
, temp_fahrenheit
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgojZGVmaW5lIENFTFNJVVNfVE9fRkFIUkVOSEVJVChjZWxzaXVzKSAoKDkuMCAvIDUuMCkgKiAoY2Vsc2l1cykgKyAzMi4wKQoKCmludCBtYWluKCkgewogICAgZmxvYXQgdGVtcF9jZWxzaXVzLCB0ZW1wX2ZhaHJlbmhlaXQ7CgogICAgLy8gSW5wdXQgdGhlIHRlbXBlcmF0dXJlIGluIENlbHNpdXMKICAgIHByaW50ZigiRW50ZXIgdGVtcGVyYXR1cmUgaW4gQ2Vsc2l1czogIik7CiAgICBzY2FuZigiJWYiLCAmdGVtcF9jZWxzaXVzKTsKCiAgICAvLyBDb252ZXJ0IENlbHNpdXMgdG8gRmFocmVuaGVpdCB1c2luZyB0aGUgbWFjcm8KICAgIHRlbXBfZmFocmVuaGVpdCA9IENFTFNJVVNfVE9fRkFIUkVOSEVJVCh0ZW1wX2NlbHNpdXMpOwoKICAgIC8vIE91dHB1dCB0aGUgdGVtcGVyYXR1cmUgaW4gRmFocmVuaGVpdAogICAgcHJpbnRmKCIlLjJmIENlbHNpdXMgaXMgJS4yZiBGYWhyZW5oZWl0XG4iLCB0ZW1wX2NlbHNpdXMsIHRlbXBfZmFocmVuaGVpdCk7CiAgICAKICAgIHJldHVybiAwOwp9Cg==