#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
class
bank
{
long
int accno;
char
name[20];
float
bal;
public:
void
input();
void
display();
};
void
bank::input()
{
cout<<"Enter
Your accont number:";
cin>>accno;
cout<<"Enter
Your name:";
gets(name);
cout<<"Enter
Your balance amount:";
cin>>bal;
}
void
bank::display()
{
cout<<"Your
account number is:"<<accno;
cout<<"\n"<<"Name
is:";
puts(name);
cout<<"Balance
amount:"<<bal;
}
void
main()
{
clrscr();
bank
obj;
obj.input();
obj.display();
getch();
}
No comments:
Post a Comment