There are many prblems in your code. To name a few:
-
scanf("%c",&choice1);
will consider the enter key press. -
case 5
float price();
–> not correct. -
if(decision1 == 'y'){ main(); }
–> use a flag anddo..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]