Vous êtes sur la page 1sur 1

CSC 128 Tutorial 2

Instruction: Answer all questions. Write full program based on the case studies below.
1. Assume that a student who is taking CS110 course takes 4 subjects per semester. Each subject will
have its grades and credit hour. Write a program to calculate a students GPA.
2. Write a program to analyze a mortgage. The user should enter the amount of the loan, the annual
interest rate and loan duration in months. The formula for the monthly payment is



Where p is the amount of the loan, r is the monthly interest rate (annual rate divided by 12) given as
a number between 0 (for 0 percent) and 1 (for 100 percent) and n is the duration of the loan in
months.

Vous aimerez peut-être aussi