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
leonid [27]
2 years ago
12

The command to get out of the loop.a.i exitii. breakiii. commentiv. for​

Computers and Technology
1 answer:
Pavel [41]2 years ago
7 0

Answer:

ii. break

Explanation:

In Computer programming, a loop can be defined as a sequence of instructions that are executed repeatedly until a specific condition is true or for a certain number of times.

This ultimately implies that, a loop is a programming structure that continually repeats a sequence of instructions until a specific condition is true (met) or for a definite number of times.

Basically, there are three (3) main types of loop in programming and these includes;

I. For loop.

II. While loop.

III. Repeat.

Since loops continually repeats a sequence of instructions until a specific condition is true (met), it is a best practice to ensure that the loop breaks at some point to avoid an infinite loop. An infinite loop typically causes a software program to crash.

Thus, the break command is used by programmers to prevent an infinite loop or terminate a current loop immediately.

Hence, the command to get out of the loop is break.

You might be interested in
Using the college registration example from section 6.7.3 as a starting point, do the following:
Arada [10]

Answer:

Explanation:

NCLUDE Irvine32.inc

TRUE = 1

FALSE = 0

.data

gradeAverage WORD ?

credits WORD ?

oKToRegister BYTE ?

str1 BYTE "Error: Credits must be between 1 and 30" , 0dh,0ah,0

main PROC

call CheckRegs

exit

main ENDP

CheckRegs PROC

push edx

mov OkToRegister,FALSE

; Check credits for valid range 1-30

cmp credits,1 ; credits < 1?

jb E1

cmp credits,30 ; credits > 30?

ja E1

jmp L1 ; credits are ok

; Display error message: credits out of range

E1:

mov edx,OFFSET str1

call WriteString

jmp L4

L1:

cmp gradeAverage,350 ; if gradeAverage > 350

jna L2

mov OkToRegister,TRUE ; OkToRegister = TRUE

jmp L4

L2:

cmp gradeAverage,250 ; elseif gradeAverage > 250

jna L3

cmp credits,16 ; && credits <= 16

jnbe L3

mov OkToRegister,TRUE ; OKToRegister = TRUE

jmp L4

L3:

cmp credits,12 ; elseif credits <= 12

ja L4

mov OkToRegister,TRUE ; OKToRegister = TRUE

L4:

pop edx ; endif

ret

CheckRegs ENDP

END main

8 0
3 years ago
Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the us
Dominik [7]

Answer:

import java.util.*;

public class Main {

public static void main(String[] args)

{

Scanner scan = new Scanner();

double budget=0, num=0, total=0;

System.out.println("Your budget for the month? ");

budget=scan.nextDouble();

System.out.println("enter all expense, and after that type -9999 to quit: ");

while(num != -9999)

{

total+=num;

num=scan.nextDouble();

}

if(total<=budget)

{

System.out.println("under budget by ");

System.out.println(budget-total);

}

else

{

System.out.println("over budget by ");

System.out.println(total-budget);

}

}

}

Explanation:

  • Take the budget as an input from user and store it to the budget variable.
  • Loop until user has entered all his expenses and keep on adding them to the total variable.
  • Check If the total is less than or equal to budget or otherwise, and then print the relevant message accordingly.
4 0
3 years ago
What is e-governence?What are the advantage of it.​
kondaur [170]

Answer:

The advantages of e-government include an improved flow of information from citizen to government, government to citizen, and within government itself. Additionally, e-government helps modernize administration procedures, improving economies and promoting transparency in the process.

E-government is the use of technological communications devices, such as computers and the Internet, to provide public services to citizens and other persons in a country or region.

5 0
2 years ago
.حدد/ي الكيانات في النظام
olasank [31]

Answer:

what

Explanation:

6 0
2 years ago
Read 2 more answers
Which statement best justifies the use of a high-speed cache in a CPU?
crimeas [40]

Cache memory is a high-speed memory that stores the instructions and data that have been frequently accessed.  It decreases the time it takes to decode the instructions stored in the instruction pipeline.

A.  It decreases the time it takes to decode instructions stored in the instruction pipeline.

<u>Explanation:</u>

Whenever an instruction is invoked or some data is accessed, the CPU looks for it in the cache memory before accessing the main memory.

If the content is found in the cache memory, it accessed from there and then and hence the access time and decode time is reduced as there were no main memory lockups.

6 0
3 years ago
Other questions:
  • You have just been named Director of Data Administration of General Hardware Co. General Hardware maintains a large central IS o
    15·1 answer
  • 2. Add a _______ to manually force text from one page to the next page. A. footer B. page break C. blank page D. header
    11·2 answers
  • The help desk received a call from a user who cannot get any print jobs to print on the locally shared printer. While questionin
    8·1 answer
  • The used of PPE in the shop includes the following, except:
    10·2 answers
  • In French class, Blue puts on a visor and the environment changes to that of a café in Paris. Which of the following terms descr
    12·2 answers
  • What are some signs that could help you determine that a date and time was inserted as a special object instead of
    14·1 answer
  • How can you stretch or skew an object in paint
    13·1 answer
  • An individualized course plan for the 4 years of
    15·2 answers
  • Creating a wedding website on the knot- how to make the text wide
    15·1 answer
  • The sdlc phase in which functional data specifications and processing rules are created is the ______________ phase.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!