This repository contains a C program for generating a pharmacy invoice based on a selected medicine and purchased quantity.
pharn.c- Main source file implementing input validation, medicine selection, calculation logic, and formatted invoice output..gitignore- Ignores generated directories and editor settings.
- Compile with your C compiler, for example:
gcc pharn.c -o pharn.exe
- Run the program and follow the prompts.
- Quantity must be greater than 0, otherwise the program prints
Invalid quantity. - Discounts apply only when quantity is greater than 100.
- Output formatting uses exactly two decimal places as required.