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

Syntax of C-language

Variable & Datatype for C-programming

Language Translator of C-language

Errors in C-language

Addition of two numbers in c language

Introduction of C-language.

Linear search in C-language

Binary searching in C-language

Program to reverse one array into other array in C-language