Project On Flow Control, Switch and Loop:-
1. Design a project where user should be allowed to
perform various operations on number:
Description: Build a project where user will be allowed to
perform various number operations
Features:
Use switch case to implement the menu.
Use loops to keep the session active until the user chooses to
exit.
Implement basic error handling (e.g., Invalid choice Entered).
Sample Operations:
Press 1=>For Factorial calculation
Press 2=>For Power calculation
Press 3=>To Generate Multiplication Table up to n numbers
Press 4=>For Factorial calculation
Press 5=>To Generate Fibonacci Series
Press 6=>To Check Prime Number
Press 7=>To Reverse a number
Press 8=>To check Palindrome Number
Press 9=>To Generate Multiplication Table up to n numbers
Press 10=>To Calculate total arrangements
Press 11=>To Calculate total Selections
Press 12=>To Generate nth Row of Pascal Triangle
Enter your choice:
2. Design a project for Number Conversion:
Description: Build a project where user will be allowed to
perform number conversion
Features:
Use switch case to implement the menu.
Use loops to keep the session active until the user chooses to
exit.
Implement basic error handling (e.g., Invalid Number Entered).
Sample Operations:
Press 1=>To Convert Decimal Number to Binary Number
Press 2=>To Convert Binary Number to Decimal Number
Press 3=>To Convert Decimal Number to Octal Number
Press 4=>To Convert Octal Number to Decimal Number
Press 5=>To Convert Decimal Number to Hexadecimal Number
Press 6=>To Convert Hexadecimal Number to Decimal Number
Enter your choice:
3. Simple ATM Interface
Description: Build a simulation of an ATM with features like
balance inquiry, deposit, withdrawal, and exit.
Features:
Use switch case to implement the menu.
Use loops to keep the session active until the user chooses to
exit.
Implement basic error handling (e.g., insufficient balance).
Sample Operations:
1. Check Balance
2. Deposit Money
3. Withdraw Money
4. Exit
Enter your choice:
4. Electricity Charge Billing System
Description: Create a program to generate electricity charge bill
as per units consumed.
Charge for first 50 unit ➔ 8₹/unit
Charge for next 25 unit ➔ 10₹/unit
Charge for next 25 unit ➔ 12₹/unit
Charge for more than 100 unit ➔ 15₹/unit
Features:
Display a menu to enter the total unit consumed for a month.
Calculate the total charge as per unit consumed added with
18% GST charge.
Eg:
Total consumed unit entered= 140 unit
o/p
Total charge= 50*8+25*10+25*12+40*15=400+250+300+600
=1550₹+ 1550*0.18=1829₹
5. Menu-Driven Calculator
Description: Create a basic calculator that performs operations
like addition, subtraction, multiplication, division, and modulus
based on user input.
Features:
Display a menu using switch case.
Perform operations based on user choice.
Use loops to allow multiple calculations until the user chooses
to exit.
Sample Input:
Enter 1st Number: 40
Enter 2nd Number: 18
Enter Operation from:
(+, -, *, / or %)
6. Restaurant Billing System
Description: Create a program to generate restaurant bills
based on selected menu items.
Features:
Display a menu with items and prices using switch case.
Use a loop to allow users to add multiple items to the bill.
Calculate the total bill added with 18% GST and display it when
the user exits.
Sample Menu:
1. Burger - $5
2. Pizza - $8
3. Sandwich - $4