why is this code not working in code playground?but in my offline compiler,it is working.. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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; }

11th Nov 2019, 7:57 AM
Aniruddha Roy
Aniruddha Roy - avatar
3 Answers
+ 1
ooh..thanks bro..i did't read your previous comment..
13th Nov 2019, 7:31 AM
Aniruddha Roy
Aniruddha Roy - avatar
0
runsway 'a' after your scanf printf("enter your choise\n1.F-C\n2.C-F\n"); scanf("%d",&choise); a switch(choise)
11th Nov 2019, 8:13 AM
Stephen Frey
0
but after deleting the 'a'.it is not working yet.
12th Nov 2019, 4:03 AM
Aniruddha Roy
Aniruddha Roy - avatar