← Back

Code Challenge 13 - ATM Validation


An ATM is a machine that allows banking customers to easily access their bank accounts. It performs three basic tasks:

Performing validation means to verify that the input from the user is in the correct form. For example, when depositing money, a user cannot deposit a dollar amount less than or equal to 0. Also, when withdrawing money, a user cannot withdraw a dollar amount greater than their bank balance.

The ATM Lite program in the Programming Fundamentals courses does not validate data. This would be unaccetable in a production environment.

Skills to Practice

Challenge Tasks

  1. Create a console project named CodeChallenge13ATMValidation.
  2. Create a banking ATM program that has the following features:
  1. Set up your balance variable ahead of time. Initialize a variable similar to one of the examples below:


balance = 500


double balance = 500;

Sample Output