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
Serjik [45]
2 years ago
8

Give a real-world example of a selection control structure.

Computers and Technology
1 answer:
yuradex [85]2 years ago
6 0

An example of selection structure is when a group of people wanted to know the exact  number of days through the use of a data set that has the daily high temperature which ranges from above 80 degrees, and as such, a programmer can use the if-end statement.

<h3>What is an if statement?</h3>

An IF statement is known to be a kind of statement that is executed due to the happening of a specific condition.

Note that IF statements must start with IF and end with the END.

Therefore, An example of selection structure is when a group of people wanted to know the exact  number of days through the use of a data set that has the daily high temperature which ranges from above 80 degrees, and as such, a programmer can use the if-end statement.

Learn more about  if-end statement from

brainly.com/question/18736215

#SPJ1

You might be interested in
Suppose that the performance measure is concerned with just the first T time steps of the environment and ignores everything the
Jobisdone [24]

Answer:

the first T time steps are a factor in the performance measure. So for instance, if the environment is in state A at time step 1, the performance measure can be different than being in state A at step 2 since the state of the environment in step 1 is relevant to the performance measure in the latter case. Thus as the performance measures can be different, the rational agent may make different actions.

3 0
3 years ago
Write a program consisting of: a. A function named right Triangle() that accepts the lengths of two sides of a right triangle as
Lunna [17]

Answer:

The java program is as follows.

import java.lang.*;

public class Triangle

{

   //variables to hold sides of a triangle

   static double height;

   static double base;

   static double hypo;

   //method to compute hypotenuse

   static double rightTriangle(double h, double b)

   {

       return Math.sqrt(h*h + b*b);

   }

public static void main(String[] args) {

    height = 4;

    base = 3;

    hypo = rightTriangle(height, base);

 System.out.printf("The hypotenuse of the right-angled triangle is %.4f", hypo);

}

}

OUTPUT

The hypotenuse of the right-angled triangle is 5.0000

Explanation:

1. The variables to hold all the three sides of a triangle are declared as double. The variables are declared at class level and hence, declared with keyword static.

2. The method, rightTriangle() takes the height and base of a triangle and computes and returns the value of the hypotenuse. The square root of the sum of both the sides is obtained using Math.sqrt() method.

3. The method, rightTriangle(), is also declared static since it is called inside the main() method which is a static method.

4. Inside main(), the method, rightTriangle() is called and takes the height and base variables are parameters. These variables are initialized inside main().

5. The value returned by the method, rightTriangle(), is assigned to the variable, hypo.

6. The value of the hypotenuse of the triangle which is stored in the variable, hypo, is displayed to the user.

7. The value of the hypotenuse is displayed with 4 decimal places which is done using printf() method and %.4f format specifier. The number 4 can be changed to any number, depending upon the decimal places required.

8. In java, all the code is written inside a class.

9. The name of the program is same as the name of the class having the main() method.

10. The class having the main() method is declared public.

11. All the variables declared outside main() and inside another method, are local to that particular method. While the variables declared outside main() and inside class are always declared static in java.

4 0
3 years ago
Students who finish their homework after school are meeting a. intrapersonal and short-term goals b. normative and short-term go
3241004551 [841]

Answer: a. intrapersonal and short-term goals

Explanation:

Intrapersonal goals are those that we set for ourselves in our minds to accomplish. The students that are finishing their homework after school most probably set that goal in their minds and so meeting it would mean meeting their intrapersonal goals.

Homework is not a long term project but rather a short one that is usually meant to be completed within days. Completing it is therefore a short term goal.

The students who finish their homework after school are therefore accomplishing both their intrapersonal and short-term goals.

6 0
4 years ago
Read 2 more answers
Can anyone answer this ​
Ivenika [448]

Answer:

I dont see the question

Explanation:

7 0
3 years ago
Se dau 2 numere de 5 cifre fiecare. sa se afiseze acel numar care are cifra din mijloc mai mare. daca cifra este aceeasi, sa se
Aleks04 [339]
There are 2 5-digit numbers each. To display the number that has the larger figure. If the figure is the same, both numbers should be displayed.

How do you answer this?
6 0
3 years ago
Other questions:
  • 7. Which innovation in video games do you think has been most significant? Include at least one way that innovation affects the
    6·1 answer
  • Consider the classes below:
    13·1 answer
  • When you purchase an item in a store, you may be charged __________.
    11·2 answers
  • Which area of study involves microeconomWhich area of study involves microeconomics? A. a nation's ability to meet consumer dema
    10·1 answer
  • Many websites (mostly online shopping sites), monitor a person’s Internet browsing behavior, such as the websites we often visit
    14·1 answer
  • Which of the following is not a characteristic of a good value log entry
    15·1 answer
  • Need the answer ASAP!!!
    14·1 answer
  • Write a C console application that will be used to determine if rectangular packages can fit inside one of a set of spheres. You
    5·1 answer
  • what is required to successfully establish a connection between two routers using chap authentication?
    14·1 answer
  • Why the computer is known as versatile and diligent device ? explain.<br>​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!