
CS102 Introduction to C Programming
Assignment 4 Submission deadline date: 10/08/2008
Max Marks: 100 (50 points each problem)
1. Using Switch case, Write a C program that prints a menu which lets you choose your account type.
Once you have entered an account type, the program calculates an interest based on your account
type and displays the updated balance on the screen
Account types interest rates
General account 5%
Student account 6%
Business account 10%
Platinum account 15%
Senior citizen’s account 20%
Input
The program will need to prompt the user to enter the following
The type of the account
Current Balance present in the account
Number of years the amount has been present in the account
The program should read the above mentioned information from the keyboard.
Output
The program will calculate the interest generated for your account and print the updated balance on the
screen.
Formula to calculate interest = (P * N * R) / 100
P = Balance present in the account
N = Number of years the amount has been present in the account
R = interest rate
Formula to calculate updated balance = P + ((P * N * R) / 100)
i.e. the current balance + interest calculated