Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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", &centigrade);

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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote