compound interest program in c










#include<stdio.h>
#include<math.h>
int main(){
    float p,r,t,ci;
    printf("Enter principle amount : ");
    scanf("%f",&p);
    printf("\nEnter interest rate: ");
    scanf("%f",&r);
    printf("\nEnter time period in year : ");
    scanf("%f",&t);
    ci = p*pow((1 + r/100),t);
    printf("\nCompound interest is : %f",ci);
    return 0;
}





Alogrithm:
**




Post a Comment