I am getting same output | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I am getting same output

#include<stdio.h> #include <math.h> int main() { float c , f ; printf ("write value of temperature in Fahrenheit: \n"); scanf("0.2%f", &f); c= (f-32)/1.8; printf ("value of temperature in celcius is: %f" , c); return 0; }

29th Dec 2021, 5:02 AM
sonam saini
2 Answers
+ 1
Just use %f without formatting specifics (width, decimal points) for scanf(), it works with %f as I tested in Code Playground.
29th Dec 2021, 5:26 AM
Ipang
+ 1
Ok thanks i did and it worked
31st Dec 2021, 1:33 AM
sonam saini