An algorithm to find compound interest.

  1. START
  2. Input Principal amount as P.
  3. Input Number of Years as N.
  4. Input Rate of Interest R
  5. Calculate CI = P*(1+R/100)N– P;
  6. Print Value of CI.
  7. END

Flowchart to find compound interest.

Flowchart for compound interest
Flowchart for compound interest
C-Code to find compound interest

#include<stdio.h>
#include<math.h>
void main()
{
float p,n,r,ci;
printf("Enter the Principal Amount: ");
scanf("%f",&p);
printf("Enter the Number of Years : ");
scanf("%f",&n);
printf("Enter the Rate of Interest : ");
scanf("%f",&r);
ci=p*pow((1+r/100),n)-p;
printf("The Complex Interest is : %.2f",ci);
}