You are on page 1of 1

EXP5_2 #include<iostream.h> #include<conio.

h> class st { public: static int roi; int p,n,si; void accept() { cout<<"Enter the principle"; cin>>p; cout<<"\nEnter the number of years"; cin>>n; } static void interest() { cout<<"\nEnter the interst rate"; cin>>roi; } void display() { si=(p*n*roi)/100; cout<<"\nSimple Intrest:\t"<<si; } }; int st::roi; void main() { clrscr(); st s; s.accept(); st::interest(); s.display(); getch(); }

Page 1

Print to PDF without this message by purchasing novaPDF (