- 1

Create a structure to specify data of customers in a bank.The data to be stored is:Account no,Name,Balance in account.

1:Declare two variables above structure I.e customer detail in bank. 2:Write a function to input and display customer detail in a bank and call in main() 3:Display customer details whose balance is more than other customer.

26th Feb 2017, 7:12 PM
Hamza Asif
Hamza Asif - avatar
2 odpowiedzi
+ 2
struct customer { int accNo; string name; double balance; void print(){ cout...... } void getInfo(){ cout... cin... } }; bool operator > (const customer & c1, const customer & c2){ return c1.balance > c2.balance; } int main(){ customer cust1; customer cust2; cust1.getInfo(); cust2.getInfo(); cust1 > cust2? cust1.print():cust2.print(); return 0; }
26th Feb 2017, 8:45 PM
Michael Szczepanski
Michael Szczepanski - avatar
0
thanks Ms for helping !
26th Feb 2017, 8:48 PM
Hamza Asif
Hamza Asif - avatar