Restaurant Billing
System
Project Purpose
The Restaurant Billing System allows a restaurant to generate
invoices for customers, store them in a data file, retrieve past
invoices, and search invoices by customer name.
It automates manual billing and calculations like discount, CGST,
SGST, and grand total.
Project Tasks
1. Input customer details and ordered items.
2. Generate invoice with calculations.
3. Save the invoice in a binary data file.
4. Display all previous invoices.
~1~
5. Search invoice for a particular customer.
6. Exit the application.
Algorithm for Generating
Invoice
Step 1: Start
Step 2: Ask user for customer name
Step 3: Ask for number of items
Step 4: For each item, input item name, quantity, and price
Step 5: Calculate total = total + (qty × price)
Step 6: Call Bill Header function
Step 7: Display item details using Bill Body function
Step 8: Calculate discount = 10% of total
Step 9: Calculate CGST & SGST = 9% each
Step 10: Calculate grand total = net total + taxes
Step 11: Display Bill Footer
Step 12: End
~2~
Algorithm for Saving Invoice
into File
Step 1: Start
Step 2: Open file '[Link]' in append mode
Step 3: Write the complete structure of order using fwrite()
Step 4: Display Success Message
Step 5: Close file
Step 6: End
Algorithm for Displaying All
Invoices
Step 1: Start
Step 2: Open file '[Link]' in read mode
Step 3: Read each order record using fread()
Step 4: For each record: print header, body, and footer
Step 5: Repeat until file ends
Step 6: Close file
Step 7: End
Algorithm for Searching
Invoice by Customer Name
~3~
Step 1: Start
Step 2: Ask user to enter customer name
Step 3: Open file in read mode
Step 4: Loop through each invoice
Step 5: Compare stored name with input name
Step 6: If match found → print invoice
Step 7: If no match after full search → print “Invoice not found”
Step 8: Close file
Step 9: End
Conclusion
This C project is a complete demonstration of file handling,
structures, functions, loops, and formatted output. It is suitable for
academic submissions or practical lab projects.
~4~