Write a C program to find the Simple Interest. Take input for principle amount, rate of interest and time from terminal

Simple Interest is the money paid by the borrower to the lender, based on the Principle Amount, Interest Rate and the Time Period.

Simple Interest is calculated by, SI= P * T * R / 100 formula.

Where, P is the Principle Amount.
T is the Time Period.
R is the Interest Rate.

Definition of 'Simple Interest' from WEB

A quick method of calculating the interest charge on a loan. Simple interest is determined by multiplying the interest rate by the principal by the number of periods.
Simple Interest = P x I x N


Where:

P is the loan amount
I is the interest rate
N is the duration of the loan, using number of periods

Explanation of 'Simple Interest'

Simple interest is called simple because it ignores the effects of compounding. The interest charge is always based on the original principal, so interest on interest is not included.  This method may be used to find the interest charge for short-term loans, where ignoring compounding is less of an issue.
Source Code:

#include<stdio.h>
main()
{
    float jama,suderhar,somoy;
    float sud=0;
    printf("\nEnter Your Principal Amount: ");
    scanf("%f",&jama);
    printf("\nEnter Your Rate of Interest: ");
    scanf("%f",&suderhar);
    printf("\nEnter The Time Period: ");
    scanf("%f",&somoy);
    suderhar=suderhar/100;
    sud=jama*suderhar*somoy;
    printf("The calculated interest is: %f",sud);
    return 0;
}
<< Go to Index Page >>

67 মন্তব্যসমূহ

  1. #include
    #include
    void main()
    {
    int p,t;
    float r;
    float SI;
    printf("\nEnter the Principle Amount, Terms, Rate of Interest :");
    scanf("%d%d%f",&p,&t,&r);
    printf("\nThe Simple Interest for the Principle \nAmount %d for %d Years with an Interest of %0.2f",p,t,r);
    SI=((p * t * r) / 100);
    printf("\n is %5.0f.",SI);

    getch();
    }
    By Mahadi.

    উত্তরমুছুন
  2. printf("\n is %5.0f.",SI);

    I think here some problem for out put show

    উত্তরমুছুন
  3. #include
    main()
    {
    int p,t;
    float r;
    float SI;
    printf("\nEnter the Principle Amount,Time of period, Rate of Interest respectively:");
    scanf("%d%d%f",&p,&t,&r);
    SI=((p * t * r) / 100);
    printf("\nInterest is: %.2f",SI);
    getch();
    }

    modify by Ashraf

    উত্তরমুছুন
  4. sir,i want to make the program in real use...try to make prompt program...here it is

    #include
    #include

    main()
    {
    float si,p,i,t;
    char ch;
    si:
    printf("enter your principle : ");
    scanf("%f",&p);
    printf("enter your time(in year) : ");
    scanf("%f",&t);
    printf("enter your interst rate : ");
    scanf("%f",&i);
    printf("you have entered,principle=%f\n time=%f year\n interst rate=%f\n",p,t,i);
    printf("if your entered data is correct press 'y' , otherwise press 'n' : ");
    scanf("%s",&ch);
    if (ch=='y' || ch=='Y')
    {
    si=(p*i*t)/100;
    printf("your simple interest is = %f",si);
    }
    else if (ch=='n'||ch=='N')
    goto si;
    getch();
    }

    উত্তরমুছুন
  5. #include
    #include

    main()
    {
    float si,p,i,t;
    char ch;
    si:
    printf("enter your principle : ");
    scanf("%f",&p);
    printf("enter your time(in year) : ");
    scanf("%f",&t);
    printf("enter your interst rate : ");
    scanf("%f",&i);
    printf("you have entered,principle=%f\n time=%f year\n interst rate=%f\n",p,t,i);
    printf("if your entered data is correct press 'y' , otherwise press 'n' : ");
    scanf("%s",&ch);
    if (ch=='y' || ch=='Y')
    {
    si=(p*i*t)/100;
    printf("your simple interest is = %f",si);
    }
    else if (ch=='n'||ch=='N')
    goto si;
    getch();
    }

    উত্তরমুছুন
  6. #include
    #include
    int main()
    {
    int num1,num2;
    float res;
    char opt;
    calc:
    printf("enter your value to calculate\n");
    scanf("%d%c%d",&num1,&opt,&num2);

    switch(opt)
    {
    case '+':res=num1+num2;
    printf("=%f\n",res);
    break;
    case '-':res=num1-num2;
    printf("=%f\n",res);
    break;
    case '*': res=num1*num2;
    printf("=%f\n",res);
    break;
    case '%':res=num1%num2;
    printf("=%f\n",res);
    break;
    case '/':(float)res=(float)num1/(float)num2;
    printf("=%f\n",res);
    break;
    default : printf("error ! enter valid sign\n");
    break;
    }
    goto calc;
    getch();
    return 0;
    }

    উত্তরমুছুন
  7. Very informative post indeed.. being enrolled in http://www.wiziq.com/course/6314-learn-c-programming-language-low-priced-student-edition was looking for such articles online to assist me.. and your post helped me a lot

    উত্তরমুছুন
  8. #include
    int main()
    {
    float a,b,c,si;
    printf("\nEnter the amount: ");
    scanf("%f",&a);
    printf("\nRate: ");
    scanf("%f",&b);
    printf("\nTime: ");
    scanf("%f",&c);
    si=(a*b*c)/100;
    printf("\nThe simple interest=%f",si);
    }

    উত্তরমুছুন
  9. #include
    #include
    main(){
    int jama,suderhar,somoy;
    int sud;
    suderhar=suderhar/100;
    scanf("%d",&jama);
    scanf("%d",&suderhar);
    scanf("%d",&somoy);
    sud=jama*suderhar*somoy;
    printf("%d",sud);
    return 0;
    }

    উত্তরমুছুন
  10. Md.Hasmot Hossen
    ID:201421066

    #include
    #include
    class interest
    {
    int n;
    float rate,p;
    public:
    void get()
    {
    cout<<“\nEnter principle Amount & no. of year: \n”;
    cin>>p>>n;
    }
    void cal(float rate)
    {
    float si;
    si=(p*n*rate)/100;
    cout<<“\n\nSimple Interest is: “<<si;
    }
    };
    void main()
    {
    interest i;
    clrscr();
    i.get();
    i.cal(4.5);
    getch();
    }

    উত্তরমুছুন
  11. #include
    main()
    {
    int x,y;
    float z;
    float SI;
    printf("\nEnter the Principle Amount,Time period, Rate of Interest respectively:");
    scanf("%d%d%f",&x,&y,&z);
    SI=((x * y * z) / 100);
    printf("\nInterest is: %.2f",SI);
    getch();
    }

    উত্তরমুছুন
  12. //*WAP a Program to find Simple Interest using constructor*//

    #include
    using namespace std;
    class interest
    {
    public:
    int p,t,r;
    int si;
    interest();
    ~interest();
    void S_interest();
    };
    interest::interest()
    {
    cout<<" ";

    }
    interest::~interest()
    {
    cout<<"destructing"<>p;
    cout<<"Enter the Time:"<>t;
    cout<<"Enter the Rate:"<>r;
    si=(p*t*r)/100;
    cout<<"The total simple interest is:"<<endl;
    cout<<si<<endl;
    }


    int main()
    {
    interest ob;
    ob.S_interest();
    return 0;

    }

    উত্তরমুছুন
  13. #include
    using namespace std;
    class interest
    {
    public:
    int p;
    float t,r;
    interest();
    ~interest();
    void intrst();
    };
    interest::interest()
    {
    cout<<"Enter Principle Amount, Time(year) And Rate:";
    cin>>p>>t>>r;
    }
    interest::~interest()
    {

    }
    void interest::intrst()
    {
    float inter;
    inter=(p*t*r)/100;
    cout<<endl<<"Interest is: "<<inter<<"Tk";
    }
    main()
    {
    interest in;
    in.intrst();
    }

    উত্তরমুছুন
  14. #include
    using namespace std;
    class arrmani
    {
    public:
    int len,i;
    int a[100];//Here is size but it is Fakibaji with compiler
    arrmani();
    ~arrmani();
    void leveling();
    void ev_oddchk();
    void show();
    void finder();

    protected:
    int o,e,osum,esum,allsum,count,p,q;
    float avg;
    };

    arrmani::arrmani()
    {
    cout<<"Array size?";
    cin>>len;
    cout<<"Enter array values: "<>a[i];

    }

    arrmani::~arrmani()
    {

    }

    void arrmani::leveling()
    {
    int b=5;
    while(b!=0)
    {
    b=0;
    int j=0;
    for(i=1;i=a[i])
    {
    p=a[j];
    a[j]=a[i];
    a[i]=p;
    b=1;
    }
    j++;
    }

    }
    cout<<"Leveled array is: ";
    for(i=0;ia[i])
    {
    q=a[i];
    }

    }
    }


    void arrmani::show()
    {
    cout<<"Number of value is: "<<count<<endl;
    cout<<"Total value is: "<<allsum<<endl;
    cout<<"Average value is: "<<avg<<endl;
    cout<<"Number of even value is: "<<e<<endl;
    cout<<"Summation of even value is: "<<esum<<endl;
    cout<<"Number of odd value is: "<<o<<endl;
    cout<<"Summation of odd value is: "<<osum<<endl;
    cout<<"largest value is : "<<p<<endl;
    cout<<"Smalest value is : "<<q<<endl;

    }

    int main()
    {
    arrmani an;
    an.leveling();
    an.ev_oddchk();
    an.finder();
    an.show();
    return 0;}

    উত্তরমুছুন
  15. #include
    using namespace std;
    class arrmani
    {
    public:
    int len,i;
    int a[100];//Here is size but it is Fakibaji with compiler
    arrmani();
    ~arrmani();
    void leveling();
    void ev_oddchk();
    void show();
    void finder();

    protected:
    int o,e,osum,esum,allsum,count,p,q;
    float avg;
    };

    arrmani::arrmani()
    {
    cout<<"Array size?";
    cin>>len;
    cout<<"Enter array values: "<>a[i];

    }

    arrmani::~arrmani()
    {

    }

    void arrmani::leveling()
    {
    int b=5;
    while(b!=0)
    {
    b=0;
    int j=0;
    for(i=1;i=a[i])
    {
    p=a[j];
    a[j]=a[i];
    a[i]=p;
    b=1;
    }
    j++;
    }

    }
    cout<<"Leveled array is: ";
    for(i=0;ia[i])
    {
    q=a[i];
    }

    }
    }


    void arrmani::show()
    {
    cout<<"Number of value is: "<<count<<endl;
    cout<<"Total value is: "<<allsum<<endl;
    cout<<"Average value is: "<<avg<<endl;
    cout<<"Number of even value is: "<<e<<endl;
    cout<<"Summation of even value is: "<<esum<<endl;
    cout<<"Number of odd value is: "<<o<<endl;
    cout<<"Summation of odd value is: "<<osum<<endl;
    cout<<"largest value is : "<<p<<endl;
    cout<<"Smalest value is : "<<q<<endl;

    }

    int main()
    {
    arrmani an;
    an.leveling();
    an.ev_oddchk();
    an.finder();
    an.show();
    return 0;}

    উত্তরমুছুন
  16. shah syed mohammad fehir Id:201520314

    #include
    using namespace std;
    int main()
    {
    int a,b;
    cout<<"please input the investment:";
    cin>>a;
    cout<<"please input the interest:";
    cin>>b;
    cout<<a+a*b/100;
    }

    উত্তরমুছুন
  17. #include
    using namespace std;

    int main()
    {
    int period, principal;
    float inrate, interest;

    cout<<"What's the amount of your principal: ";
    cin>>principal;

    cout<>period;

    cout<>inrate;
    cout<<endl;

    interest=period*principal*inrate;

    cout<<"The total interest is: "<<interest;

    return 0;
    }

    উত্তরমুছুন
  18. Appel mahmud akib. Id:201510384


    #include
    using namespace std;
    int main()
    {
    int p,t,r;
    cout<<"Input principal amount: ";
    cin>>p;
    cout<<"Input interest rate: ";
    cin>>r;
    cout<<"Input time: ";
    cin>>t;
    cout<<endl<<(p*t*r)/100<<endl;

    }

    উত্তরমুছুন
  19. #include
    using namespace std;
    int main()
    {
    float far;
    cout<<"Input Temperature in farenheit: ";
    cin>>far;
    cout<<"Your temperature in celcius:(7.0/9.0) * (far-32)";
    }

    উত্তরমুছুন
  20. #include
    using namespace std;
    int main()
    {
    int p,t,r;
    cout<<"Input principal amount: ";
    cin>>p;
    cout<<"Input interest rate: ";
    cin>>q;
    cout<<"Input time: ";
    cin>>t;
    cout<<endl<<(p*q*r)/100<<endl;

    }

    উত্তরমুছুন
  21. using c++

    #include

    using namespace std;

    float func(float money, float interest, int time)
    {
    return ((money*time*interest)/100);
    }

    int main()
    {
    float i, j;
    int k;
    cout << "Enter total ammount --: ";
    cin >> i;
    cout << "Enter interest rate in (%) --: ";
    cin >> j;
    cout << "Enter your time for your money --: ";
    cin >> k;
    cout <<"The calculated interest is --: " << func(i, j, k);
    return 0;
    }

    উত্তরমুছুন
  22. Using C++
    #include
    using namespace std;

    int main()
    {
    int i,t,a,sum;

    cout<<"Enter The amount";
    cin >>a;
    cout<<"Enter The interest";
    cin >>i;
    cout<<"Enter The time";
    cin >>t;
    sum =a*i*t/100;
    cout<<a*t*i/100<<sum;

    return 0;
    }

    উত্তরমুছুন
  23. using c++

    #include
    using namespace std;
    int main()
    {
    int p,t,r;
    cout<<"Input principal amount: ";
    cin>>p;
    cout<<"Input interest rate: ";
    cin>>r;
    cout<<"Input time: ";
    cin>>t;
    cout<<endl<<(p*t*r)/100<<endl;

    }

    উত্তরমুছুন
  24. #include
    using namespace std;

    int main()
    {
    double amount,interest,time, total;

    cout <<"Enter the amount: "<< endl;
    cin >>amount;
    cout <<"Enter the interest: "<< endl;
    cin >>interest;
    cout <<"Enter the time: "<< endl;
    cin >>time;
    interest = interest/100;
    total =(amount*interest*time);
    cout <<"The total interest is: "<<total<< endl;
    return 0;
    }


    id:201510992

    উত্তরমুছুন
  25. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  26. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  27. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  28. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  29. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  30. #include
    main()
    {
    float jama,suderhar,somoy;
    float sud=0;
    printf("\nEnter Your Principal Amount: ");
    scanf("%f",&jama);
    printf("\nEnter Your Rate of Interest: ");
    scanf("%f",&suderhar);
    printf("\nEnter The Time Period: ");
    scanf("%f",&somoy);
    suderhar=suderhar/100;
    sud=jama*suderhar*somoy;
    printf("The calculated interest is: %f",sud);
    return 0;
    }

    উত্তরমুছুন
  31. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  32. #include
    using namespace std;
    int main()
    {
    float m,s,t,i=0;
    cout<<"Enter Your Principal Amount: "<>m;
    cout<<"Enter Your Rate of Interest: " <>s;
    cout<<"Enter The Time Period: "<>t;
    s=s/100;
    i=m*s*t;
    cout<<"The calculated interest is: "<<i;
    }

    উত্তরমুছুন
  33. #include
    int main(){
    int a,i,t,sum=0;
    printf("enter the amount=");
    scanf("%d",&a);
    printf("enter the interest=");
    scanf("%d",&i);
    printf("enter the time=");
    scanf("%d",&t);
    sum+=a*i*t/100;
    printf("%d",sum);
    }

    উত্তরমুছুন
  34. #include

    main()

    {
    int a,b,result ;
    printf("Enter a: \n");
    scanf("%d",&a);

    printf("Enter b: \n");
    scanf("%d",&b);

    result = a*a+2*a*b+b*b;
    printf("The result of: %d",result);

    }

    উত্তরমুছুন
  35. Summer 2017
    ID#201610042

    Answer to the Question No. 2:

    https://drive.google.com/file/d/0B99eePh0LV8gWnBJTnRXazlNVlk/view?usp=drivesdk

    উত্তরমুছুন
  36. https://drive.google.com/file/d/0B0Llv4Ca9Ln6alZ3b2Z3ekVlTzg/view?usp=sharing

    উত্তরমুছুন
  37. https://drive.google.com/open?id=0Bw0-FMVCC94QZlNNOGtncVdVdGc

    উত্তরমুছুন
  38. ID : 201620195
    https://drive.google.com/open?id=0B9K31ospCyFjRjhISUU4UndWeXM

    উত্তরমুছুন
  39. https://drive.google.com/open?id=0BzTqZMBWR6eOaWpJZEJQZzJyOWc

    উত্তরমুছুন
  40. id no:201610259
    name: jahirul islam

    https://drive.google.com/open?id=0B8CpW2ga6ah0WTJXdWk5N29vRzA

    উত্তরমুছুন
  41. https://drive.google.com/open?id=0B8369pAqjVVpd0QxR1ZJeHdEZjQ

    উত্তরমুছুন
  42. https://drive.google.com/open?id=0B8369pAqjVVpd0QxR1ZJeHdEZjQ

    উত্তরমুছুন
  43. wp. https://drive.google.com/open?id=0B8369pAqjVVpeHN5WG9sN3NTYWs

    উত্তরমুছুন
  44. wp & rt.. https://drive.google.com/open?id=0B8369pAqjVVpTXRDaloxb2hvcnc

    উত্তরমুছুন
  45. https://drive.google.com/open?id=0Byxq3aat_mNSVTJFbE1IN2V5SlU

    উত্তরমুছুন
  46. ID 201610456
    Name MD USUF MIA
    https://drive.google.com/open?id=0B_PIGnOMR0K2a2N3QkoxazlpSEU

    উত্তরমুছুন
  47. ID:201520552
    https://drive.google.com/open?id=0B5pG0kIjzgEKRm4zdzJoTkJoT3M

    উত্তরমুছুন
  48. ID 201610456
    MD USUF MIA
    https://drive.google.com/open?id=0B_PIGnOMR0K2a2N3QkoxazlpSEU

    উত্তরমুছুন
  49. 1.https://drive.google.com/open?id=0B7UQyRdu6h2wOHNxUGhsRkUyVUk

    উত্তরমুছুন
  50. Id:201620318
    https://drive.google.com/open?id=0B2gcteJZycWoYUhNWkRtRWRsNm8

    উত্তরমুছুন
  51. https://www.dropbox.com/s/cq4sotgxib8k82q/HW2%20paramiter.cpp?dl=0

    উত্তরমুছুন
  52. https://www.dropbox.com/s/eun02fve1t51a3g/HW2%20constructor.cpp?dl=0

    উত্তরমুছুন
  53. Id= 201710494
    https://www.dropbox.com/s/f9pp7byxe62mhis/prob%202.cpp?dl=0

    উত্তরমুছুন
  54. https://drive.google.com/open?id=0B3bVD5Ppt_STN3YySkppUmxOTXc

    উত্তরমুছুন
  55. ID : 201620128
    https://drive.google.com/open?id=0B0ZDK2wgeHVWdlQycVc4OWNtVlk

    উত্তরমুছুন
  56. ID: 201710950
    https://drive.google.com/open?id=0B1SMDOPeCkX_M01rNlVDOVk1a2s

    উত্তরমুছুন
  57. https://drive.google.com/open?id=0B2Kd5YiufNdVUHVyVzlmdXIyS1U

    উত্তরমুছুন
  58. https://drive.google.com/open?id=0BzKpnVbF4fc3QWhPd2FIQWpOVHc

    উত্তরমুছুন
  59. ID:-201610058
    1.https://drive.google.com/open?id=0B7UQyRdu6h2wOHNxUGhsRkUyVUk

    উত্তরমুছুন
নবীনতর পূর্বতন