[Solved] Check C Programming Code [closed]


There are many prblems in your code. To name a few:

  1. scanf("%c",&choice1); will consider the enter key press.

  2. case 5 float price(); –> not correct.

  3. if(decision1 == 'y'){ main(); }–> use a flag and do..while()

etc. etc.

Also, it is not a very good practive to put everything inside main. To clean up the code and enhance readability, how about creating separate functions for each case and calling them from switch case?

solved Check C Programming Code [closed]