Question: You will write pseudocode to achieve the requirements described below. Assume there is an integer array called numbers of size n (where n > 1)
You will write pseudocode to achieve the requirements described below.
Assume there is an integer array called numbers of size n (where n > 1)
The first m slots of the array (where m
The integers are sorted in an increasing order.
Assume the user entered an integer that is stored in a variable called num.
Write pseudocode that will insert the value of num into the array numbers while keeping the order.
example:
Use ONLY the following vocabulary:
replace the bold parts with your variables and expressions.
define a datatype called variable_name
example:
define an int called i
copy from expression to variable_name
note: the data type of expression must match that of variable_name
example:
copy from 1+1 to i copy from 100 to i copy from numbers[0] to i copy from i to numbers[i]
while (boolean_expression)
note1: inside a while loop, put 4 white spaces for indents
note2: you CANNOT use a break statement.
example:
while ( iif (boolean_expression)
note1: inside an if statement, put 4 white spaces for indents
node2: you can use "else".
example:
if ( in-5 m 3 num 5 numbers[3 68 n-5 num 5 numbers3 568
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
