// PROPOSITION: JAVA IS FOR WIMPS. C CAN DO EVERYTHING, WITHOUT THE BS #include #include typedef struct accstruct * account; struct accstruct { double balance; char* name; }; account newaccount(char* n, double b) { account A = (account)malloc(sizeof(struct accstruct)); A->name=n; A->balance=b; return A; } void inquiry(account A) { printf("%s has balance %.2f\n", A->name, A->balance); } void withdraw(account A, double amt) { if (amt>0 && amtbalance) A->balance-=amt; } void deposit(account A, double amt) { if (amt>0) A->balance+=amt; } int moremoney(account A, account B) { return A->balance > B->balance; } int main() { account myaccount = newaccount("prof", 1000); account youraccount = newaccount("student",1000); withdraw(myaccount,200); deposit(youraccount,100); inquiry(youraccount); printf("%d\n",moremoney(youraccount,myaccount)); return 0; }//main