+ 1

Please help in this code. Don't understand what is missing

This program is to show the output form the class ShowFuel() https://code.sololearn.com/cNBX0899yOd9/?ref=app

10th May 2017, 4:13 AM
Soham Biswas
Soham Biswas - avatar
7 Answers
+ 13
As of the latest standard, main() must return int. int main() { //codes return 0; } Other than that, it is 'else if' not 'elseif'. Missing semicolon somewhere in cal_fuel function. Use string instead of char(100). gets() is obsolete. Use getline(cin, Destination) after applying fix.
10th May 2017, 4:26 AM
Hatsy Rei
Hatsy Rei - avatar
+ 8
also - no need for return type of float in cal_fuel, this can be a return type of void
10th May 2017, 4:32 AM
jay
jay - avatar
+ 6
Also check first if statement in cal_fuel is this supposed to be 1000?
10th May 2017, 4:52 AM
jay
jay - avatar
+ 6
let me know when you have updated your code so I can delete the version I have. k thanks
10th May 2017, 4:57 AM
jay
jay - avatar
+ 3
yeah that's supposed to be 1000. and thanks everyone for the support.
10th May 2017, 4:55 AM
Soham Biswas
Soham Biswas - avatar
+ 2
ok. done. you can delete now
10th May 2017, 4:59 AM
Soham Biswas
Soham Biswas - avatar
10th May 2017, 4:36 AM
Soham Biswas
Soham Biswas - avatar