C Program for simple interest
Simple interest formula is given by:
Simple Interest = (P x T x R)/100
Where,
P is the principle amount
T is the time and
R is the rate
Examples:
EXAMPLE1:
Input : P = 10000
R = 5
T = 5
Output :2500
We need to find simple interest on
Rs. 10,000 at the rate of 5% for 5
units of time.
EXAMPLE2:
Input : P = 3000
R = 7
T = 1
Output :210
C++
// CPP program to find simple interest for // given principal amount, time and rate of // interest. #include<iostream> using namespace std; int main() { // We can change values here for // different inputs float P = 1, R = 1, T = 1; /* Calculate simple interest */ float SI = (P * T * R) / 100; /* Print the resultant value of SI */ cout << "Simple Interest = " << SI; return 0; } |
chevron_right
filter_none
Please refer complete article on Program to find simple interest for more details!
Recommended Posts:
- Create Directory or Folder with C/C++ Program
- C Program to Swap two Numbers
- C Program for Bubble Sort on Linked List
- C program to invert (making negative) an image content in PGM format
- C Program for Selection Sort
- C Program for Bubble Sort
- C Program for Insertion Sort
- C Program for Radix Sort
- C/C++ Program for n-th Fibonacci number
- C Program for Counting Sort
- C Program for Binary Search (Recursive and Iterative)
- C Program for Min Cost Path
- C/C++ Program for Longest Increasing Subsequence
- C Program for Pancake sorting
- C Program for Binary Insertion Sort



