Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question ii Total = 1 5 % Standard items [ 3 . 0 % ] ; Algorithm for inputs and error handling [ 3 .
Question ii
Total
Standard items ; Algorithm for inputs and error handling ; Algorithm for determining if there is at least one odd number in the dataset and if there is no odd number ;
On Answer Sheet Qii, develop the algorithm for a Function called OddNumber that will determine if there is at least one odd number in an array of random integers names IntegerDataset The Function's only input, via a worksheet cell, will be the number of random integers NumberofIntegers in the array. Thereafter, the Function will receive from the user, via input boxes, the value for each random integer in the array. If there is at least one odd number in the array, the Function will output: "There is at least one odd number in this dataset". Alternatively, the Function will output: "There is no odd number in this dataset".
Note: If you employ other variables, ensure their names can be easily understood.
Test:
NumberofIntegers
IntegerDatasetNumberofIntegers
The output from Function OddNumberNumberofIntegers There is at least one odd number in this dataset
Question iii
Standard items VBA code
On Answer Sheet Qiii, complete the VBA code that will undertake the task described in Question ii
Hint:
To determine if an integer is an odd number, you may use the VBA Builtin Function: Mod
Mod returns the remainder after a Number has been divided by the Divisor. I
For example:
is an even number because Mod returns ie is evenly divisible by times with a remainder of
is an odd number because Mod returns ie divided by times with a remainder of
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started