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

F=100; calculate C C=212 calculate F C=32 calculate F lnopreare the methods inco

ID: 3806643 • Letter: F

Question


F=100; calculate C
C=212 calculate F
C=32 calculate F

lnopreare the methods inco an appl Display the results. Digits pawing the dat encerod. methods: 6.22 mechod the integer integer kemperature, using the Caurvmisur lunplement the following a Fahrenheit al celsius retums lie Celsius equivalent of celsius .0 9.0 (fahrenheit 32): valent of a Celsius temperature, the Fahrenheit equ Method fahrenheit mrturre cl Use the methods from parts (al and write an application that enables the uscrei. b to ther to enter Fahrenheit tempe and display the Celsius valent or to enter Celius temperature and display the Fahrenheit equivalent.

Explanation / Answer

Here what code to use for application development is not specified so I am using C code

a)

#include<stdio.h>

int main(void)

{

int fahrenheit = 100 ;

double celsius;

celsius = (5.0/9.0)*(fahrenheit-32);

printf("celcius termperature is: %1f",celsius);

}

b)

#include<stdio.h>

int main(void)

{

int celsius = 212 ;

double fahrenheit;

fahrenheit = (9.0/5.0)*(celsius+32);

printf("fahrenheit termperature is: %1f",fahrenheit);

}

c)

#include<stdio.h>

int main(void)

{

int inputtemp ;

double outputtemp;

int a;

printf("enter the temperature you want to convert/n");

scanf("%d",&inputtemp);

printf("if you want to change into fahrenheit enter 0 or 1 to convert into celsius");

scanf("%d",&a);

if(a==0)

{

outputtemp = (9.0/5.0)*(inputtemp+32);

printf("fahrenheit termperature is: %1f",outputtemp);

}

else

{

outputtemp = (5.0/9.0)*(inputtemp-32);

printf("celcius termperature is: %1f",outputtemp);

}

}