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
malfutka [58]
3 years ago
11

11.

Computers and Technology
1 answer:
kodGreya [7K]3 years ago
6 0

Answer:

The basic difference between finite and infinite is the number of times it runs and ends. The loop is basically a set of instructions that keeps repeating itself.

The finite loop ends after running for a finite times. This body of finite loop will stop executing after certain condition is reached. Hence the finite loop body keeps executing itself finite number of times.

An infinite loop keeps running and repeating itself endlessly.This loop never ends. This loop can be the result of an error in a program. For example when no stopping or exit condition is specified in the program.

Explanation:

Example of finite loop:

Lets take for loop as an example:

for(int i =0; i<=5; i++)

{ cout<<i<<endl; }

Now the loop starts from i=0

Next it enters the body of loop to execute the statement: cout<<i; which means that the value of i is displayed on the output screen.

This loop keeps executing until the value of i exceeds 5.

At first iteration 0 is printed on the output screen, at second iteration 1, at third iteration 2, at fourth iteration 3, fifth iteration 4, sixth iteration 5. After each of these iterations, the value of i is incremented by 1.

When 5 is printed, then at the next iteration the specified condition i.e. i<=5 gets false as the value of i now becomes 6 after incremented by 1.

So the loop stops running. So this means that loop ran for finite times and stopped after the a certain condition is reached. The output is:

0

1

2

3

4

5

Example of infinite loop:

Lets take while loop:

int i = 6;

    while (i >=5)

    {         cout<< i;

             i++;     }

In the above example, the loop will run infinite times. Here the value of i is initialized to 6. Then while loop is used which checks the condition which is the value of i is greater than or equal to 5. If the condition is true, the body of the loop starts executing which prints the value of i. Lets see what happens at each iteration:

1st iteration: i>=5 is True because i=6 and 6 is greater than 5. The program control enters the body of loop. The statement cout<<i prints 6. Next the value of i is incremented by 1 and it becomes 7.

2nd iteration: i>=5 is True because i=7 and 7 is greater than 5. The program control enters the body of loop. The statement cout<<i prints 7. Next the value of i is incremented by 1 and it becomes 8.

This loop will repeat itself infinite times and never stops as i will always have value greater than 5. So this is the example of infinite loop.

You might be interested in
A customer wants to purchase a new home computer. The machine will mainly be used for internal browsing and streaming video, exc
Gekata [30.6K]

Answer:

Four-core processor

Explanation:

A four-core processor also known as a quad-core processor has four units cores that are independent and are responsible for reading and executing instruction in the central processing unit of a computer or system. It has high processing speed and is the best for gaming, and for multitasking purposes.

4 0
3 years ago
Ano ang word processor at electronic spreadsheet​
AveGali [126]

Answer:

excel

Explanation:

3 0
3 years ago
Read 2 more answers
Matt Cooper of Soggy Bottom Canoe and Kayak Rental refers to concept testing as​ _____ testing.
andrezito [222]

Answer:

Beta

Explanation:

Beta testing is a Quality Assurance process, where Developers and testers evaluate the quality of application experience from the point of view of the users, who are the most important targets of any software product.

5 0
3 years ago
WILL GIVE BRAINLIEST AND 30 POINTS!! NEED ASAP!!!!
kotykmax [81]

Answer:

Explanation:

1. In tabletop games and video games, game mechanics are the rules that guide the player's moves or actions, as well as the game's response to them.

5.User interface is about the visual design and the information designs around the screens while the User Experience is about the whole experience and not only about the screen. User interface is mainly focused on the product while User experience on the other hand mostly focuses on the user and their journey through the product.

5 0
3 years ago
THESE ARE GAME DESIGN QUESTIONS PLEASE TRY TO ANSWER THESE QUESTIONS AS BEST TO YOUR KNOWLEDGE, THANK YOU ALL FOR EVERYTHING YOU
Setler79 [48]

1. The purpose of an action game is to provide an alternate reality where you have opportunity to pursue adventure. The purpose of a trivia game is to have fun while answering questions, perhaps with a trace of competitivity. Since the games are in different genres, the purposes of the games are different; trivia games are oftentimes simpler in function, while action games require more involvement and of course, action.

2. Some games are easier to play with two people, like games that require teamwork. However, others are more conveniently played by yourself. For example, Ge0metry Dash should be played by yourself, but games like F0rtnite can be more easily played in teams. However, there are also games that can be played both by oneself and with others, like Min3craft.  

3. The way you would play an action game is entirely different from how you would play a trivia game, so certain genres require different gameplay styles.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Instructions:Select the correct answer.
    15·2 answers
  • One of the ways to create a horizontal navigation menu from an unordered list is to a. set the display property of the element w
    6·1 answer
  • Technician A says that automotive engine blocks are usually classified by the number of cylinders the block. Technician B says t
    9·1 answer
  • How many data bits are sent in a single psk31 character?
    15·1 answer
  • Select the correct answer.
    12·2 answers
  • Suppose that a 2M x 16 main memory is built using 256kB x 8 RAM chips and memory is word addressable, how many RAM chips are nec
    6·1 answer
  • The term structure, as it relates to programming, refers to the decisions you make to design your program to best meet its objec
    11·1 answer
  • We have studied machine cycle in class. Suppose that each of the four modules of machine cycle is taking 2 seconds. If there are
    5·1 answer
  • Have y’all enjoyed The new hero floryn from Mobile legends
    6·1 answer
  • The discipline of building hardware architectures, operating systems, and specialized algorithms for running a program on a clus
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!