 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C Program for simple interest?
Simple Interest is the product of principal amount, rate of interest and the time duration (in years) by 100.
Example,
Input − p=5, r=4, t=5
Output − 1
Explanation: Simple Interest = (Principal Amount * Rate of Interest * Number of years) / 100
SI= 5*4*5/100 = 1
Example
#include<iostream> #include <stdio.h> using namespace std; int main() {    //principle amount    float p = 5;    //time    float r = 4;    //rate in years    float t = 5;    // Simple interest    float SI = 0;    SI =(p * t * r) / 100;    printf("Simple Interest = %f ",SI);    return 0; }  Output
Simple Interest = 1.0000
Advertisements
 