Answer:
The solution code is written in Java.
System.out.println(numItems);
Explanation:
Java <em>println() </em>method can be used to display any string on the console terminal. We can use <em>println()</em> method to output the value held by variable <em>numItems.</em> The <em>numItems </em>is passed as the input parameter to <em>println()</em> and this will output the value of <em>numItems</em> to console terminal and at the same time the output with be ended with a newline automatically.
Answer:
See explaination
Explanation:
Please kindly check attachment for the step by step and very detailed solution of the given problem
Answer:
Check the explanation
Explanation:
Code
.ORIG x4000
;load index
LD R1, IND
;increment R1
ADD R1, R1, #1
;store it in ind
ST R1, IND
;Loop to fill the remaining array
TEST LD R1, IND
;load 10
LD R2, NUM
;find tw0\'s complement
NOT R2, R2
ADD R2, R2, #1
;(IND-NUM)
ADD R1, R1, R2
;check (IND-NUM)>=0
BRzp GETELEM
;Get array base
LEA R0, ARRAY
;load index
LD R1, IND
;increment index
ADD R0, R0, R1
;store value in array
STR R1, R0,#0
;increment part
INCR
;Increment index
ADD R1, R1, #1
;store it in index
ST R1, IND
;go to test
BR TEST
;get the 6 in R2
;load base address
GETELEM LEA R0, ARRAY
;Set R1=0
AND R1, R1,#0
;Add R1 with 6
ADD R1, R1, #6
;Get the address
ADD R0, R0, R1
;Load the 6th element into R2
LDR R2, R0,#0
;Display array contents
PRINT
;set R1 = 0
AND R1, R1, #0
;Loop
;Get index
TOP ST R1, IND
;Load num
LD R3,NUM
;Find 2\'s complement
NOT R3, R3
ADD R3, R3,#1
;Find (IND-NUM)
ADD R1, R1,R3
;repeat until (IND-NUM)>=0
BRzp DONE
;load array address
LEA R0, ARRAY
;load index
LD R1, IND
;find address
ADD R3, R0, R1
;load value
LDR R1, R3,#0
;load 0x0030
LD R3, HEX
;convert value to hexadecimal
ADD R0, R1, R3
;display number
OUT
;GEt index
LD R1, IND
;increment index
ADD R1, R1, #1
;go to top
BR TOP
;stop
DONE HALT
;declaring variables
;set limit
NUM .FILL 10
;create array
ARRAY .BLKW 10 #0
;variable for index
IND .FILL 0
;hexadecimal value
HEX .FILL x0030
;stop
.END
Answer:
I know ship has stream line body
Using the knowledge of computational language in python it is possible to write a code that writes a list and defines the arrange.
<h3>Writing code in python:</h3>
<em>def isSorted(lyst):</em>
<em>if len(lyst) >= 0 and len(lyst) < 2:</em>
<em>return True</em>
<em>else:</em>
<em>for i in range(len(lyst)-1):</em>
<em>if lyst[i] > lyst[i+1]:</em>
<em>return False</em>
<em>return True</em>
<em>def main():</em>
<em>lyst = []</em>
<em>print(isSorted(lyst))</em>
<em>lyst = [1]</em>
<em>print(isSorted(lyst))</em>
<em>lyst = list(range(10))</em>
<em>print(isSorted(lyst))</em>
<em>lyst[9] = 3</em>
<em>print(isSorted(lyst))</em>
<em>main()</em>
See more about python at brainly.com/question/18502436
#SPJ1