Question: Write an algorithm for an ATM program. Think about where there would be selection statements, menus, loops (counted vs. conditional), etc. but dont write MATLAB

Write an algorithm for an ATM program. Think about where there would be selection statements, menus, loops (counted vs. conditional), etc. but dont write MATLAB code, just an algorithm (pseudo-code).

I know the MatLab code would be:

balance = 500; pin = input('Enter PIN'); c = menu('Choose:','deposit','withdraw','display','return card'); while(c<4) switch c case 1 x = input('Add how much?'); if(x>0) balance = balance+x; end case 2 x = input('Withdraw how much?'); balance = balance-x; else error('Insufficient Funds'); end case 3 fprintf('Your money is at %.2f ', balance); case 4 fprintf('Your money is at %.2f ', balance); break; end c = menu('Choose:','deposit','withdraw','display','return card'); end else disp('Incorrect PIN.'); end

**But I need to make this just an algorithm (pseudo-code)!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!