1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Luba_88 [7]
2 years ago
11

Consider the following code:

Computers and Technology
1 answer:
Volgvan2 years ago
8 0

Answer:

The code will get stuck in an infinite loop.

Explanation:

Since val is decreasing by 1 each time it meets the criteria of being smaller than 10, your code will get stuck in an infinite loop since val will always be smaller than 10.

Hope this helps :)

You might be interested in
Which of the following is an example of a tax?
Alik [6]
Medicare because it’s like insurance
5 0
3 years ago
Convert the following numbers. (Please show all steps; no marks will be awarded if no steps are shown) [1.5 x 4 = 6 marks]
katen-ka-za [31]

Answer:

i. 10210212

ii. 100 101 001 in BASE 2

iii. 46.4631

iv. 12.453125

Explanation:

i. Converting to base 10 we get

=  10 x 162 + 13 x 161 + 9 x 160 = 2777

Converting to base 10 we get  =

2777/3 = 925 with remainder 2

925/3 = 308 with remainder 1

308/3 = 102 with remainder 2

102/3 = 34 with remainder 0

34/3 = 11 with remainder 1

11/3 = 3 with remainder 2

3/3 = 1 with remainder 0

1/3 = 0 with remainder 1

Hence the Answer is 10210212

ii. = Octal is taken in pair of 3 bits , Writing binary of each number in 3 bits we get  = 100 101 001 in BASE 2

iii. = 1 x 52 + 2 x 51 + 3 x 50 + 3 x 5-1   = 38.6 in decimal

Converting to Octal we get

38 /8 = 4 with remainder 6

4 /8 = 0 with remainder 4

.6 x 8 =  4.8

.8 x 8 = 6.4

46.4631

iv. = 1x 81 + 4 x 80 + 3 x 8-1 + 5 x 8-2   = 12.453125

Check here for Free courses about IT and Management www.eacademy.lk

4 0
3 years ago
What is mark in in premiere pro
Studentka2010 [4]
Markers are an often underutilized tool in the Premiere Pro CC toolbox. They are little colored tabs you can apply to both your timeline and your source clips to indicate important points in time with a color or note.
5 0
3 years ago
The U.S. National Institute of Standards and Technology defines the incident response life cycle as having four main processes:
GuDViN [60]

Answer:

C. Post-incident activity.

Explanation:

An incident is a event of intrusion or attack or violation of an attempt of an attack. An incident response is an opposing response to an attack or violation.

An incident response life cycle are stages followed to mitigate a current attack or violation. The stages of the incident response life cycle are, preparation, detection and analysis, containing and eradicating and recovery, and post incident activity.

7 0
3 years ago
let m be a positive integer with n bit binary representation an-1 an-2 ... a1a0 with an-1=1 what are the smallest and largest va
Ahat [919]

Answer:

Explanation:

From the given information:

a_{n-1} , a_{n-2}...a_o in binary is:

a_{n-1}\times 2^{n-1}  + a_{n-2}}\times 2^{n-2}+ ...+a_o

So, the largest number posses all a_{n-1} , a_{n-2}...a_o  nonzero, however, the smallest number has a_{n-2} , a_{n-3}...a_o all zero.

∴

The largest = 11111. . .1 in n times and the smallest = 1000. . .0 in n -1 times

i.e.

(11111111...1)_2 = ( 1 \times 2^{n-1} + 1\times 2^{n-2} + ... + 1 )_{10}

= \dfrac{1(2^n-1)}{2-1}

\mathbf{=2^n -1}

(1000...0)_2 = (1 \times 2^{n-1} + 0 \times 2^{n-2} + 0 \times 2^{n-3} + ... + 0)_{10}

\mathbf {= 2 ^{n-1}}

Hence, the smallest value is \mathbf{2^{n-1}} and the largest value is \mathbf{2^{n}-1}

3 0
2 years ago
Other questions:
  • The spreadsheet below shows the names years in office, and number of terms for five US presidents
    7·2 answers
  • . Alex discovered a bunch of SATA drives in a box at the office and needs to check the contents. What can he do so that Windows
    13·1 answer
  • What office application has animations on the home ribbon?
    7·2 answers
  • Discuss in detail why you need to use a write blocker (either hardware or software) in your examinations, whether for a criminal
    6·1 answer
  • What happens when the following code segment executes if test.txt does not exist?:<br> A,B,C,D?
    7·1 answer
  • Select the correct text in the passage,
    10·1 answer
  • What is GND and what color wire do we connect to GND? (this is like for circuits and stuff btw)
    7·1 answer
  • Write a Java program that creates a two-dimensional array of type integer of size x by y (x and y must be entered by the user).
    7·1 answer
  • If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of s
    12·1 answer
  • How to square a number in java.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!