+ 1

Whats wrong in my code?

I made a speed converter in C Programming that will convert (kilometer per hour to meter per second and vice verse)..I made a program that will take speed and unit(kmh or ms) as inputs and convert them to other unit..for example it will ask for speed and then unit(kmh or ms) then convert it but its not working I used if else statements..but it doesnt work for both whether kmh or ms... Plss check my code https://code.sololearn.com/cGpJ02mV2nFh/?ref=app

30th Aug 2021, 5:23 AM
Pujan Chakma
Pujan Chakma - avatar
1 Réponse
+ 4
(1) #include <conio.h> is not available in SoloLearn (and not required in your code). (2) main is not well defined; it should be 'int main()'. (3) string comparision with == results in undefined behaviour so you should use strcmp() for it.
30th Aug 2021, 5:50 AM
abhinav
abhinav - avatar