Computer Science, asked by SleetyMallard8402, 1 year ago

Write a pseudocode that accepts the temperature celsius converts it into fahrenheit and then display reasult

Answers

Answered by Anonymous
4

/* C Program to convert temperature from Fahrenheit to Celsius and vice versa.*/

 

int main()

{

 

   float fh,cl;

   int choice;

 

   printf("\n1: Convert temperature from Fahrenheit to Celsius.");  

   printf("\n2: Convert temperature from Celsius to Fahrenheit.");

   printf("\nEnter your choice (1, 2): ");

   scanf("%d",&choice);

 

   if(choice ==1){

       printf("\nEnter temperature in Fahrenheit: ");

       scanf("%f",&fh);

       cl= (fh - 32) / 1.8;

       printf("Temperature in Celsius: %.2f",cl);

   }

   else if(choice==2){

       printf("\nEnter temperature in Celsius: ");

       scanf("%f",&cl);

       fh= (cl*1.8)+32;

       printf("Temperature in Fahrenheit: %.2f",fh);

   }

   else{

       printf("\nInvalid Choice !!!");

   }

   return 0;

}

 

Output


Iloveyouji45: hyy
Iloveyouji45: arya
Anonymous: yes bro, how can i help you?
Iloveyouji45: how are you
Iloveyouji45: hyy
Anonymous: fantastic and you?
Anonymous: okay bro its too much night so,bye good night
Iloveyouji45: i like yur pic
Answered by Iloveyouji45
0

Answer:

hlo Arya how are you dear


Anonymous: oye tell sister
Similar questions