15.9.15

simple interest using c++

/* Write a C program to find the Simple Interest. Take input for Principle Amount, Rate of Interest and Time from terminal. */
  
#include<iostream>
#include<conio.h>
using namespace std;
int simple_interest(int a,int t,float i)
{
    float si=a*t*i/100;
    return si;
}
int main()
{
    int principle_amount,Time;
    float Interest_rate;
    cout<<"Enter the Principle Amount:"<<endl;
    cin>>principle_amount;
    cout<<"Enter the Time:"<<endl;
    cin>>Time;
    cout<<"Interest_rate"<<endl;
    cin>>Interest_rate;
    cout<<"Interest is:"<<simple_interest(principle_amount,Time,Interest_rate)<<endl;
}
 

No comments:

Post a Comment

Comment Here