C
Christian
I am taking a vb.net class and I am stumped on how to approach the
following assignment. To be honest, I do not even know where to start.
If someone would help me with this code and help me discover what I am
missing, I would greatly appreciate it. The assignment is as follows:
Create a function, IsPositive, that takes an integer and returns True
if the integer is > 0, and False Otherwise
Create another function, Average, that takes a Single, and Integer. It
uses IsPositive, on the integer, and if the result is true, it returns
a string which represents the Single variable divided by the Integer,
Otherwise, it returns a string of "Error"
Create a Procedure, DisplayResult, that takes a single, and integer,
and passes them to the Average function above, and displays its result
in a messagebox with Ok button, Results in titlebar, and the
infomration icon. 20 Points
All variables above are passed by Value.
Make sure you use the conversion functions to change the data types to
the required type.
Thanks in advance!
following assignment. To be honest, I do not even know where to start.
If someone would help me with this code and help me discover what I am
missing, I would greatly appreciate it. The assignment is as follows:
Create a function, IsPositive, that takes an integer and returns True
if the integer is > 0, and False Otherwise
Create another function, Average, that takes a Single, and Integer. It
uses IsPositive, on the integer, and if the result is true, it returns
a string which represents the Single variable divided by the Integer,
Otherwise, it returns a string of "Error"
Create a Procedure, DisplayResult, that takes a single, and integer,
and passes them to the Average function above, and displays its result
in a messagebox with Ok button, Results in titlebar, and the
infomration icon. 20 Points
All variables above are passed by Value.
Make sure you use the conversion functions to change the data types to
the required type.
Thanks in advance!