Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- struct BankAccount{
- string holder_name;
- int account_number;
- float balance;
- };
- typedef struct BankAccount BankAccount;
- string richer(BankAccount s1, BankAccount s2){
- if(s1.balance > s2.balance) return s1.holder_name;
- else s2.holder_name;
- }
- int bigBigNumber(int *val, int *sq, int *cube){
- *sq = (*val)*(*val);
- *cube = (*val)*(*val)*(*val);
- }
- int main(){
- BankAccount rakkhosh, khokkosh;
- rakkhosh.holder_name = "Rakkhosh";
- rakkhosh.account_number = 4410;
- rakkhosh.balance = 30023.3;
- khokkosh.holder_name = "Khokkosh";
- khokkosh.account_number = 234423;
- khokkosh.balance = 33.44;
- cout << richer(rakkhosh, khokkosh) << endl;
- int val = 4;
- int sq, cube;
- bigBigNumber(&val, &sq, &cube);
- cout << val << endl;
- cout << sq << endl;
- cout << cube << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement