Computer Science, asked by jiya912568, 1 year ago

Write a program to input principle,rate,number of years. Calculate and print the compound interest​

Answers

Answered by Ragab20
0

Answer: Write a C program to input principle (amount), time and rate (P, T, R) and find Compound Interest. How to calculate compound interest in C programming. Logic to calculate compound interest in C program.

Example

Input

Enter principle (amount): 1200

Enter time: 2

Enter rate: 5.4

Output

Compound Interest = 1333.099243

Answered by sswaraj04
1

Answer:

#include <iostream>

#include<math.h>

using namespace std;

int main()

{

   int am;

   double r,t;

   cout<<"Enter principal amount ";

   cin>>am;

   cout<<"Enter rate of interest ";

   cin>>r;

   cout<<"Enter time(in years) ";

   cin>>t;

   double a=pow((1+r/100),t)*am;

   cout<<"Compound interest generated is "<<a-am;

   return 0;

}

Explanation:

Hope it helps :-)

Mark it brainliest

Similar questions