QBasic Tutorial 12 - Simple Calculator With Input Validation - QB64


This tutorial will show how to make a simple calculator program that asks the user for two numbers. After the computer receives two numbers, the program will prompt the user to add, subtract, multiply or divide the two numbers. the program will display the answer and prompt the user to repeat the program or quit.

Input validation is used within this program. Input validation is used to check to see if the user entered the data correctly.

Code Download
QBT12.BAS



QBasic / QB64 Links

QB64 is a free download at www.qb64.com

QB64 Wiki & Manual is found at qb64.com/wiki.html

QBasic 1.1 comes with OldDOS. A zip file of OldDOS can be found at www.pcxt-micro.com/download.html

QBasic 1.1 needs DOSBox to run on Windows Vista and greater, Mac, and Linux.
DosBox is a free download at www.dosbox.com

Free QB64/QBasic Code

QBasic.Net - www.qbasic.net

Pete's QBasic Site - www.petesqbsite.com/index.php

QB45 - qb45.org

Phatcode - games.phatcode.net