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
Wittaler [7]
4 years ago
14

Nested if-else structures can contain many blocks of code. How many of those blocks of code might be executed?

Computers and Technology
1 answer:
dezoksy [38]4 years ago
7 0

Answer:            

A nested if else structure is defined as using one if-else inside another one. It is used when you want a take a decision by checking several conditions. Nested if can contain many block of codes with each block executing if the certain condition is met for each of that block.

The number of blocks of code, that might be executed depends on the condition that is intended to be met, in order to take a certain decision based on that condition. Let suppose if the desired condition is met in the very first block of code then only one block of code is executed. For example consider the following code:

if(number<5)

{  if(number==1)  {

  cout<<"number is 1"<<number; }

 else

 {       cout<<"number is greater than 1"<<number; } }

       else

      {         cout<<"number is greater than 5";}

Suppose the number entered is 1. So the first nested if condition is true and number is 1 will be displayed. So none of the else blocks has to be executed.

Number of code blocks that might be executed also relies on the number of block present in the code.

The execution also depends on the number of blocks that are true or false. If you want to execute a block for true condition, nested if else looks through every block until the block with the true desired condition is reached but if you want false condition to be checked to display the block of code when condition gets false then it will look through all the blocks until it gets the block with that false part.

For example consider the following code:

if ( number > 0)

   {        cout << "its a positive number: " << number;    }

   else if (number < 0)

   {         cout<<"its a negative integer: " << number;    }

   else     {

            cout << "its a 0";   }

Suppose the number is 0 and the program has to sequentially checks for each condition. It will check number>0 which is not what we need, then it will check else if statement for number<0 which is again not desired and finally it will display the block "its a 0" which matches the desired condition.

You might be interested in
____ is a website that checks a submitted paper and then determines how much of the paper is unoriginal.
Lemur [1.5K]

Answer: A) Turnitin

Explanation:

Turnitin is the website that offers a good opportunity for checking the proper citation and once the information or paper is submitted and store store in this website then, it becomes its database permanently.  

It basically determine that whether the uploaded paper is original or not. The turnitin website identify the pre-phases in the document or paper. It does not accept any kind of PDF file, forms and portfolios.

All of the other given options are that particular website which determine the originality of the paper.  

5 0
3 years ago
A dog walks 10 km north in 2 hours and then 8 km south in 1 hour.
OverLord2011 [107]

Answer:

Average speed = 6 km/h and Average velocity = 0.67 km/h

Explanation:

Given that,

A dog walks 10 km north in 2 hours and then 8 km south in 1 hour.

(a) Average speed = total distance traveled divided by total time taken

Distance = 10+8 = 18 km

Total time = 2+1 = 3 h

Average speed = (18/3 )km/h= 6 km/h

(b) Average velocity = net displacement divided by total time taken

Let north is positive and south is negative

Displacement = 10+(-8) = 2 km

Total time = 2+1 = 3 h

Average velocity= (2/3 )km/h= 0.67 km/h

3 0
3 years ago
What is a template class in c++?
AURORKA [14]
Install Visual Studio 2017 and install the C++ pack and you have access to the templates (function and class)
7 0
3 years ago
Escribe un ejemplo de:• Software de aplicación. • Software de diagnóstico. • Software de sistema. ayudenme plis, me toca entrega
Afina-wow [57]

Answer:

1. Software de aplicación: Microsoft Word.

2. Software de diagnóstico: Speccy.

3. Software de sistema: Windows operating system (OS).

Explanation:

Un software puede definirse como un conjunto de instrucciones ejecutables (códigos) o una colección de datos que se utiliza normalmente para instruir a una computadora sobre cómo realizar una tarea específica y resolver un problema en particular.

Básicamente, los softwares se clasifican en tres (3) categorías principales y estas son;

1. <u>Software de aplicación</u>: es un software de usuario final que normalmente está diseñado para realizar tareas y funciones específicas.

Algunos ejemplos de software de aplicación son Microsoft PowerPoint, Notepad, Windows Media player, Firefox, Go-ogle Chrome, Adobe Photoshop, AutoCAD, etc.

2. <u>Software de diagnóstico</u>: estos son programas de software que se utilizan para solucionar problemas y posiblemente reparar un sistema informático.

Algunos ejemplos de software de diagnóstico son Speccy, Windows Sysinternals Suite, System Explorer, hddscan, HWiNFO, SIW (System Information for Windows), CPU-Z, HD Tune, etc.

3. <u>Software de sistema</u>: es un software que normalmente está diseñado para ejecutar el hardware de la computadora y todas las demás aplicaciones de software.

Algunos ejemplos de software del sistema son Linux, Windows OS, Mac OS, WinZip, McAfee antivirus, Norton antivirus, Avast antivirus, Piriform CCleaner, Ubuntu, etc.

8 0
3 years ago
The seventh generation of PMS, entails the migration of computing resources (e.g., hardware, software, and data) to a remote dat
uranmaximum [27]

Answer:

The answer is

Explanation:

5 0
3 years ago
Other questions:
  • Quote one of morrie's aphorisms and explain what you think it means (page 18).
    14·1 answer
  • What is an individual piece of data called in a database? coding A field B file C record or D tittle
    9·1 answer
  • What is the differnce between ''P4 and 4P''
    12·2 answers
  • How do you leave a conversation or group text on iphone (ios 10)? Help!!
    5·1 answer
  • What computing platform was designed to help a beginner create interactive objects that receive input from sensors and use that
    11·1 answer
  • Which term is used to describe bitmap images
    8·2 answers
  • Write a C++ program that reads a temperature value and the letter C for Celsius or F for Fahrenheit. Print whether water is liqu
    14·1 answer
  • Ask what are brainly points for besides asking questions.
    9·1 answer
  • Which of these is an example of collective voice?
    8·2 answers
  • Draw at least 15 fabric/garment care labels on a piece of paper to be submitted the following week
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!