ee312bank.c

# ee312bank.c - /* * Name: Owlia, Arria * UTEID: apo223 *...

This preview shows pages 1–2. Sign up to view the full content.

Sheet1 Page 1 /* * Name: Owlia, Arria * UTEID: apo223 * Unique #: 15735 * EE312 Assignment 2 - ee312bank.c */ #include <stdio.h> int main(void) { int choice = 0 float principal = 0, EMI = 0, term = 0, interest = 0, remainingBalance = 0, prepayAmount = 0, payment = 0, permTerm = 0, i = 0 do { printf("Good morning! Welcome to the EE312 Bank. Please select from the following choices:\n") printf("Press 1 to calculate the EMI for a new loan.\n") printf("Press 2 to calculate payment amounts for prepaying a loan.\n") printf("Press 3 to exit.\n") { printf("You have entered an illegal character. Exiting Program. ..") getch() break } switch(choice) { case 1: printf("Enter the loan's principal: ") printf("Enter the loan's term (in months): ") EMI = (principal+((principal*20)/100))/term printf("Thank you. Your estimated monthly payment (EMI) for each month is: \$%.2f\n\n", EMI) break case 2: printf("Enter the loan's remaining principal: ") printf("Enter the number of months remaining on the loan's term: ")

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 05/01/2008 for the course EE 312 taught by Professor Shafer during the Spring '08 term at University of Texas.

### Page1 / 4

ee312bank.c - /* * Name: Owlia, Arria * UTEID: apo223 *...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online