Program to print compound interest in c-language

Program to print compound interest in c-language

#include<stdio.h>
#include<math.h>
int main()
{
    float CI,p,r,t;
    printf("Enter principle value\n");
    scanf("%f",&p);
    printf("Enter rate value\n");
    scanf("%f",&r);
    printf("Enter time\n");
    scanf("%f",&t);
    CI=p*pow((1+(r/100)),t)-p;
    printf("Compound interest=%f",CI); 
}

OUTPUT
Enter principle value
500
Enter rate value
3
Enter time
5
Compound interest=79.636955

This program give you a good knowledge about pow function and math.h header file.
And also implementation of complex formula.

If you like this program then you can share it and for any issues you can direct contact with me from Home Page.


For regular updates you can also follow my site.



Comments

Popular posts

Creative pattern of butterfly in C-language

Introduction of C-language.

Variable & Datatype for C-programming

Addition of two numbers in c language

Language Translator of C-language

Program to cheque enter number is even or odd in c-language

Program to print the cube of a number in c-language

Program to show present time and date in C-language

Binary searching in C-language