Design a simple C program and corresponding flowchart that simulates a billing system for a mini grocery store using basic if-else
statements and C syntax.
Assignment Instructions (5 Marks)
-
Design a flowchart (using draw.io or hand-drawn and scanned) that:
-
Takes input for item name, quantity, and unit price.
-
Calculates total price.
-
Applies discount logic:
-
If total > 1000, apply 10% discount.
-
If total > 500 but <= 1000, apply 5% discount.
-
Otherwise, no discount.
-
-
Outputs final bill amount.
-
-
Write a C program to:
-
Take 3 inputs: item name, quantity, unit price.
-
Calculate and apply discount.
-
Print:
-
Item name
-
Quantity
-
Unit price
-
Total price
-
Discount applied
-
Final amount
-
-
-
Submit both:
-
The
.c
file -
The flowchart in PDF or image format
Presentation Guidelines (8 Marks)
Each student (or pair) will record or deliver a 3–5-minute presentation covering:
-
Flowchart Explanation – How the logic flows (2 Marks)
-
Code Walkthrough – Variable declaration, input/output, decision-making (2 Marks)
-
Discount Logic Justification – Explaining the
if-else
structure (2 Marks) -
Improvements or Extensions – Bonus: any creative extension, like multiple item input, better UI (2 Marks)
Bonus Twist (Optional for Extra Credit):
-
You can choose another real-life scenario (e.g., movie ticket booking, electricity billing) using similar
if-else
logic and flowchart design.
-
-
-