Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question ii Total = 1 5 % Standard items [ 3 . 0 % ] ; Algorithm for inputs and error handling [ 3 .

Question ii
Total =15%
Standard items [3.0%]; Algorithm for inputs and error handling [3.0%]; Algorithm for determining if there is at least one odd number in the dataset and if there is no odd number [9%];
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 =6
IntegerDataset(NumberofIntegers)=24,4,2,23,56,76
The output from Function OddNumber(NumberofIntegers)= There is at least one odd number in this dataset
Question iii
]=[15%
Standard items [2%], VBA code [13%]
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 Built-in Function: Mod
Mod returns the remainder after a Number has been divided by the Divisor. I
For example:
12 is an even number because 12 Mod 2 returns 0 i.e.12 is evenly divisible by 2(6 times) with a remainder of 0.
13 is an odd number because 13 Mod 2 returns 1 i.e.13 divided by 2=6 times with a remainder of 1.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions