Learn C++ beginer programs

July 5, 2009

Write a program to find Simple interest

Filed under: cin,cout,simple Interest — snehilkhanor @ 5:46 pm
Principal ammount, rate of Interest and time period is Taken from user and Simple Interest is calculated.

Select To use this code as it is.. select and copy paste this code into code.cpp file :)
  1. #include <iostream.h>
  2. #include <conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. float p,r,t,f,s=0;
  7. cout<<”Please enter Principle ammount “;
  8. cin>>p;
  9. cout<<”Please enter rate of Interest. “;
  10. cin>>r;
  11. cout<<”Please enter Time Period “;
  12. cin>>t;
  13. f=p*r*t;
  14. s=f/100;
  15. cout<<”The Simple iterest is “<<s;
  16. getch();
  17. }

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.