# 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 p, r, t, a, 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);
a = p*(pow((1 + r / 100), t));
ci = a - p;
printf("\nCompound Interest=%f",ci);
}
```

#### Output:

Enter Principle=100 Enter Rate=10 Enter Time=3 Simple Interest=30.000000 Compound Interest=33.100010c language tutorial learn c language study c language

**Recent Posts**

- UP Board Math Class 7th Chapter 6 - रेखीय समीकरण April 13, 2022
- UP Board Math Class 7th Chapter 3 - साँख्यिकी April 13, 2022
- UP Board Math Class 7th Chapter 2 - घातांक April 13, 2022
- Bubble Sort in String Program in Java April 4, 2022
- Palindrome String April 4, 2022
- Piglatin Form Program in Java April 4, 2022
- Find Vowels And Capital Letter in Array Program in Java April 4, 2022
- Find Positive and Negative Numbers in Array Program in Java April 4, 2022
- UP Board Math Class 7th Chapter 1 - परिमेय संख्याएँ March 24, 2022
- Peterson Number Program in Java March 21, 2022
- Mystery Number Program in Java March 21, 2022
- Print Capital String Program in Java December 31, 2021
- Fascinating Number Program in Java November 14, 2021
- Evil Number Program in Java November 14, 2021
- Insertion Sort Program in Java November 7, 2021
- Deleting Element From Array Program in Java November 7, 2021
- Adding Element In Array Program in Java November 7, 2021
- Capricorn or Kaprekar Number Program in Java October 16, 2021
- LCM and HCF of two numbers Program in C October 6, 2021
- Find day of week from a given date Program in C October 6, 2021