Ratik a young millionaire deposits $10000 into a bank account paying 7% simple interest per year. He left the money in for 5 years. He likes to predict the interest and the amount earned by him at the end of 5 years
Can you help him to find the interest and amount resided in his bank acoount after 5 years?
Functional Description:
interest = (p * i * t) / 100 and
amount = p + interest.
where p is total principal, i is rate of interest per year, and t is total time in years.
Input:
Input has three values representing Principle,Interest per year and Time.
Output:
First Line: Print the interest earned for the principle amount.
Second Line: Print the Total amount earned including interest.
#include <stdio.h> int main() { float p,i,interest,amount; int t; scanf("%f %f %d",&p,&i,&t); interest=p*i*t/100; amount=p+interest; printf("Interest after %d Years = $%.2f",t,interest); printf("\nTotal Amount after %d Years = $%.2f",t,amount); return 0; }
INPUT_1:
10000 7.8 5
OUTPUT:
Interest after 5 Years = $3900.00
Total Amount after 5 Years = $13900.00
INPUT_2:
13000 9 7
OUTPUT:
Interest after 7 Years = $8190.00
Total Amount after 7 Years = $21190.00
INPUT_3:
12500 9.3 7
OUTPUT:
Interest after 7 Years = $8137.50
Total Amount after 7 Years = $20637.50
Morae Q!
- Convert seconds to hours – HMS format.
- Find out the tax amount of the bill with tip for the meal.
- Find the area of the pyramid.
- Find the area of triangle using heron’s formula.
- Find the interest and amount resided in the bank.
- Convert the travel days to years and months.
- Find the first three powers of N number.
- Compute the height from feet and inches to centimetres.
- Calculate the amount of interest earned in the bank.
- Find the ways they can choose the sequence of dummy statues.
- Find the Lapindrome strings.
- Classify the salary of a person.
- Find the day on providing the week number.
- Find the least number of marble stones needed to pave the square mall.
- Find the number of steps on chessboard performed to satisfy a condition.
- Find the time, hours and minutes the train was delayed.
- Find the quantity of food packets shared and available.
- Compute all Arithmetic Operations.
- Find the amount to pay for the electricity bill.
- Find the sum of numbers with three values after decimal point.