---
title: CSCI 1301 -- Lab 19
author: Clément Aubert
lang: en
fontsize: 10pt
documentclass: scrartcl
numbersections: true
links-as-notes: true
papersize: letter
geometry: margin=1in
keywords:
- Computer Science
- Problem solving methods
- Syllabus
- Augusta University
- Bachelor of Science
---

# Checkpoint

The code we just studied in class, slightly expanded and with an application program, is [available to download](LoanCalculator.zip).

# Validating Inputs

Edit the `Program.cs` file of the project you previously download so that:

- User entering a value different from `A`, `a`, `H`, `h`, `O` and `o` would be asked again, and asked as long as they do not give a valid answer,
- User entering a credit score not between 300 and 850, or that is not an integer, would be asked again, and asked as long as they do not give a valid answer,
- User entering an amount needed or a downpaiment that is not a decimal, or is a negative decimal, would be asked again,  and asked as long as they do not give a valid answer.
- (Optional) Use the [ToLower()](https://docs.microsoft.com/en-us/dotnet/api/system.char.tolower?view=netframework-4.7.2) or [ToUpper()](https://docs.microsoft.com/en-us/dotnet/api/system.char.toupper?view=netframework-4.7.2) methods of the `char` class to make the program more readable (you will be able to greatly simplify the `if` statement).
