Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int choice;
- float temp,value;
- printf("Enter your temperature:");
- scanf("%f",&temp);
- printf("Enter your choice:");
- scanf("%d",&choice);
- if(choice==1)
- {
- value=((temp-32)*5)/9;
- }
- else if(choice==2)
- {
- value=(9*temp)/5+32;
- }
- printf("result is=%.2f\n",value);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement