+ 1
why is this code not working in code playground?but in my offline compiler,it is working..
#include<stdio.h> int main() { while(1) {int choise; float temp,ct; printf("enter your choise\n1.F-C\n2.C-F\n"); scanf("%d",&choise); a switch(choise) { case 1: { printf("enter F temp :"); scanf("%f",&temp); ct = (temp-32)/1.8; printf("%f\n",ct); break; } case 2: { printf("enter C temp :"); scanf("%f",&temp); ct = (1.8*temp)+32; printf("%f\n",ct); } default: printf("invalid option\n"); } } return 0; }
5 odpowiedzi
+ 1
ooh..thanks bro..i did't read your previous comment..
0
runsway 'a' after your scanf
printf("enter your choise\n1.F-C\n2.C-F\n");
scanf("%d",&choise); a
switch(choise)
0
but after deleting the 'a'.it is not working yet.