Sunday, 16 October 2016

HHW Q16. WAP to print Simple Interest.

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int p,r,t,si;
cout<<"Enter the Principal amount ";
cin>>p;
cout<<"Enter the rate ";
cin>>r;
cout<<"Enter time (in years);
cin>>t;
si=(p*r*t)/100;
cout<<"Simple interest = "<<si;
getch();
}

No comments:

Post a Comment

Basic Implementation of Array as a Pointer

#include<iostream.h> #include<conio.h> void main() { clrscr();   int arr[5];   cout<<"Enter 5 nos. ";   f...