lmayer@elgin.edu

lab2

CIS105 – Qbasic Arithmetic

Design a program that will input two numbers from the user, then output

  • the two numbers added together
  • the second number subtracted from the first
  • the two number multiplied together
  • the first number divided by the second
  • integer division of the first number by the second
  • modulo arithmetic of the first number by the second

Make sure you label each operation.

You will turn in

  • your flowchart or pseudo-code
  • a copy of the program
  • the output

Remember to comment your program with your name, program name, date and description.

Use PRINT statements to label your output with your name, etc. as well

Output screen should look something like this:

Program: Basic Arithmetic

Written by: your name

 

Input two numbers

120

25

 

Addition: 145

Subtraction: 95

Multiplication: 3000

Division: 4.8

Integer division: 4

Modulo arithmetic: 20

 

Use the following values for test data:

120, 25

1.5, 3.4

700, 5.12

0, 5.5

5.5, 0