1. Use code tags.
2.
scanf("&c", &code);
3. Your do while will print invalid code even if someone inputs a valid code.
4. Use switch statements instead of if-else.
5. For double I think the format specifier is %f only and not %lf, but not sure.
6. Indent your code properly.