# Simple Interest and Compound Interest Program in C

## WAP that calculates the Simple Interest and Compound Interest. The Principal, Amount, Rate of Interest and Time are entered through the keyboard.

```
#include<stdio.h>
#include<math.h>
/*2. WAP that calculates the Simple Interest and Compound Interest.*/
/* The Principal, Amount, Rate of Interest and Time are entered through the keyboard.*/
void main()
{
float a,p, r, t, si, ci;
printf("Enter Principle=");
scanf("%f",&p);
printf("Enter Rate=");
scanf("%f",&r);
printf("Enter Time=");
scanf("%f",&t);
si=(p*r*t)/100;
printf("Simple Interest=%f",si);
ci = p* (pow((1 + r / 100), t));
printf("\nCompound Interest=%f",ci);
}
```

#### Output:

Enter Principle=1000 Enter Rate=5 Enter Time=3 Simple Interest=150.000000 Compound Interest=1157.624878c language tutorial learn c language study c language

##### Find us

www.efaculty.in

India

+91-9454163745

efaculty.in[@]gmail.com

##### Recent Pages

##### Most recent posts

##### Main Page

Copyright @2019 | Designed by Afaq Ahmad Khan