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: | var x, y; | These are obtained from from text boxes n1 and n2. | |
| OTHER VARIABLES: | var result; | ||
| INITIALIZATION: | n1 and n2 must be provided 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: | var x, y; | These are obtained from from text boxes n1 and n2. | |
| OTHER VARIABLES: | var result; | ||
| INITIALIZATION: | n1 and n2 must be provided 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: | var x, y; | These are obtained from from text boxes n1 and n2. | |
| OTHER VARIABLES: | var result; | ||
| INITIALIZATION: | n1 and n2 must be provided 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: | var x, y; | These are obtained from from text boxes n1 and n2. | |
| OTHER VARIABLES: | var result; | ||
| INITIALIZATION: | n1 and n2 must be provided by the user. | ||
| COMPUTATION: | result = x / y; | ||
| OUTPUT: | return(result); | Remember to place the result in the form text box named answer |