Deliverables:
To complete this assignment you must --
Introduction: The goal of this assignment is to give you experience working with functions. You will create simple calculator by programming the basic functions.
Add(x, y)
Section | Pseudocode | Comments | |
---|---|---|---|
INPUT: | Integer x, y; | These are obtained from from text boxes n1 and n2. | |
OTHER VARIABLES: | Number result; | ||
INITIALIZATION: | n1 and n2 must be provded by the user. | ||
COMPUTATION: | result = x + y; | ||
OUTPUT: | return(result); | Remember to place the result in the form text box named answer |
Subtract(x, y)
Section | Pseudocode | Comments | |
---|---|---|---|
INPUT: | Integer x, y; | These are obtained from from text boxes n1 and n2. | |
OTHER VARIABLES: | Number result; | ||
INITIALIZATION: | n1 and n2 must be provded by the user. | ||
COMPUTATION: | result = x - y; | ||
OUTPUT: | return(result); | Remember to place the result in the form text box named answer |
Multiply(x, y)
Section | Pseudocode | Comments | |
---|---|---|---|
INPUT: | Integer x, y; | These are obtained from from text boxes n1 and n2. | |
OTHER VARIABLES: | Number result; | ||
INITIALIZATION: | n1 and n2 must be provded by the user. | ||
COMPUTATION: | result = x * y; | ||
OUTPUT: | return(result); | Remember to place the result in the form text box named answer |
Divide(x, y)
Section | Pseudocode | Comments | |
---|---|---|---|
INPUT: | Integer x, y; | These are obtained from from text boxes n1 and n2. | |
OTHER VARIABLES: | Number result; | ||
INITIALIZATION: | n1 and n2 must be provded by the user. | ||
COMPUTATION: | result = x / y; | ||
OUTPUT: | return(result); | Remember to place the result in the form text box named answer |