Skip to content

Instantly share code, notes, and snippets.

@Mashpy
Created April 14, 2014 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mashpy/10674051 to your computer and use it in GitHub Desktop.
Save Mashpy/10674051 to your computer and use it in GitHub Desktop.
#include<stdio.h>
int main()
{
float cel,far;
int ch; printf("Enter ur celcious value1: \n");
scanf("%f",&cel);
far=(cel*1.8)+32;
printf("Fahrenheit: %0.2f",far); switch(ch)
{
case '1':
{
printf("Enter ur celcious value1: \n");
scanf("%f",&cel);
far=(cel*1.8)+32;
printf("Fahrenheit: %0.2f",far);
break;
}
case '2':
{
printf("Enter ur celcious value2: \n");
scanf("%f",&far);
cel=(far-32)/1.8;
printf("Celsius: %0.2f",cel);
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment