Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Check It! Show diff LAST RUN on 2/16/2021, 8:15:45 PM x Check 1 failed Output: Enter temperature in Fahrenheit: Celsius: -18 Fahrenheit: 0.0 Expected: Celsius

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Check It! Show diff LAST RUN on 2/16/2021, 8:15:45 PM x Check 1 failed Output: Enter temperature in Fahrenheit: Celsius: -18 Fahrenheit: 0.0 Expected: Celsius : Fahrenheit: 32.0 Check 2 failed Output: Enter temperature in Fahrenheit: Celsius: -17 Fahrenheit: 1.0 Expected: Celsius: Fahrenheit: 33.8 Check 3 failed Output: Enter temperature in Fahrenheit: Celsius: 2 Fahrenheit: 35.0 Expected: Celsius : Fahrenheit: 95.0 ko. 1.. sinclude 2. void main() { 3 4 H/float variables declared to store celsius and fahrenheit 5 float cel, fah; 6 7 temperature in celsius taken input 8 printf("Enter temperature in Fahrenheit: "); 9 scanf(1195f", &fah); le //celcius converted to fahrenheit using the formula of conversion 12 cel = (fah-32)*5/9; 13 14 "H/Printing temperature in celcius and fahrenheit 15 printf("Celsius: %.ef ",cel); printf("Fahrenheit: 98.1f", fah): 17 I 16 #include void main() { //float variables declared to store celsius and fahrenheit float cel, fah; //temperature in celsius taken input printf("Enter temperature in Fahrenheit: "); scanf("%f", &fah); //celcius converted to fahrenheit using the formula of conversion cel = (fah-32)+5/9; //Printing temperature in celcius and fahrenheit printf("Celsius: 90.0f ",cel); printf("Fahrenheit: %0.if", fah); } LAST RUN on 2/16/2021.8:15:45 PM x Check 1 failed Output: Enter temperature in Fahrenheit: Fahrenheit: 0.0 Expected: Celsius: Fahrenheit: 32.0 Check 2 failed Output: Enter temperature in Fahrenheit: Fahrenheit: 1.0 Expected: Celsius : Fahrenheit: 33.8 Check 3 failed Output: Enter temperature in Fahrenheit: Fahrenheit: 35.0 Expected: Celsius : Fahrenheit: 95.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students explore these related Databases questions