The formula for converting centigrate tmeperatures to Fahrenheit is: F= 32+(C+(1
ID: 638794 • Letter: T
Question
The formula for converting centigrate tmeperatures to Fahrenheit is: F= 32+(C+(180/100)) Write a program (USING C) that asks the user to enter a temperture reading in centigrade and then prints the equicalent Fahrenheit value. Be sure to include at lease one negative centigrade number in your test cases. I have tried this multiple times but it just keeps telling me its a file read error. PLEASE HELP This is the code im writing using terminal. When I use gcc to compile its saying it cant read the file. WHY?!?!
#include<stdio.h>
int main()
{
float centigrade, fahrenheit;
printf(" Enter temp. in Centigrade : ");
scanf("%f", ¢igrade);
fahrenheit = (1.8 * centigrade) + 32;
printf(" Temperature in Fahrenheit : %f ", fahrenheit);
return (0);
}
Explanation / Answer
Your code is correct.
Are you sure you are compiling the program from the right path??
Before you compile use "cd" command to go to the file's path, then compile and run.
comment if you further have any doubts
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.