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
Reptile [31]
2 years ago
8

What is a conditional statement? What is another name for conditional statement? Give 2 examples of conditional statements?

Computers and Technology
1 answer:
vlada-n [284]2 years ago
8 0

Answer:

A conditional statement instructs a system to do action based on whether a condition is true or false. This is frequently expressed as an if-then or if-then-else expression. A conditional statement is applied to predicate choices on circumstances. When there is no condition around the instructions, they run sequentially. If you add a condition to a block of statements, the execution flow may alter depend on the outcome of the condition. It is also known as a one-way selection statement because we utilize the if condition, provide the argument, and if the argument is passed, the relevant function is performed; else, nothing happens. 

Examples of conditional statements:

1)<em> int time = 20;</em>

<em>if (time < 16) {</em>

<em>  System.out.println("Have a good day.");</em>

<em>} else {</em>

<em>  System.out.println(" Enjoy your evening.");</em>

<em>}</em>

<em />

2) <em>using namespace Conditional;</em>

<em>static void Main(string[] args) </em>

<em>{</em>

<em>  // This method determines what a user should do for the day based on the weather condition </em>

<em />

<em>  public void Weather(string myWeather)</em>

<em>  {</em>

<em>    // 1st condition</em>

<em>    if (myWeather == "Sun")</em>

<em>    {</em>

<em>      // Decision</em>

<em>      Console.WriteLine("Go to the beach");</em>

<em>    }</em>

<em>    // 2nd condition</em>

<em>    else if (myWeather == "Rain")</em>

<em>    {</em>

<em>      Console.WriteLine("Go to the library")</em>

<em>    }</em>

<em>    // 3rd condition</em>

<em>    else if (myWeather == "Cloudy")</em>

<em>    {</em>

<em>      Console.WriteLine("Go to the park")</em>

<em>    }</em>

<em>    else</em>

<em>    {</em>

<em>      //otherwise</em>

<em>      Console.WriteLine("Rest at home")</em>

<em>    }</em>

<em>  }</em>

<em>}</em>

You might be interested in
True or false: when an ospf route sends its link state information, it is sent only to those nodes directly attached neighbors.
Korvikt [17]

Answer:

The following statement is True.

Explanation:

LSU(Link State Update) is also known as the Link State Acknowledgements.  

Link State Update packets are use for flooding of the Link State Acknowledgements and sending Link State Acknowledgement response to the Link State Request packets.  

It sent directly connected neighbors who previously requested the Link State Acknowledgements in form of the Link State Request packets.  

In the case of the flooding, neighbors routers are only responsible for the re-encapsulation of the received Link State Acknowledgement informations in the new Link State Update packets.

4 0
3 years ago
Use fuel with the _____________ rating recommended by your vehicle manufacturer. A ) Converter B) Emission C) Exhaust D) Octane
Free_Kalibri [48]
I would say the correct answer is "octane". It is important that you use the fuel with  the correct octane rating recommended by the manufacturer. Among the choices it is only octane that is used as a rating for fuels. Hope this helps.
7 0
3 years ago
Read 2 more answers
When naming a file you should use the _____________ instead of a space in a filename.
larisa [96]

Answer:

_ or -

Explanation:

I've seen it both ways, but I've seen _ being used more. sorry its not an exact answer

8 0
3 years ago
4.(L.5.1.A) Select the sentence that includes an interjection,
spin [16.1K]

Answer:

Hurray, we won the tournament!

Explanation:

hurray is an interjection just like yikes, uh-oh, and others

5 0
2 years ago
Match the installation type to its description.
MariettaO [177]

Answer:

Following are the types of installation matched to its respective definitions.

<h3>Upgrade installation:</h3>

What you do when you have a computer with an existing operating system that needs to be upgraded.

This means that while working on a window when you get attracted by the update introduced recently and you upgrade your window accordingly.

For example: Updating a window from 8 to 10 or desired features.

<h3>Multiple boot installation:</h3>

What you do when you have several operating systems on one computer.

In this type of installation, a computer has different windows for different accounts. You can boot to the desired installed window by switching account.

<h3>Clean installation:</h3>

What you do on a brand new computer that has never been set up before and does not have an operating system on it yet.

It can be defined as the installation of window done very first time on to the computer. Sometimes when the window gets deleted due to virus or any other factor, the installation at that time will also be termed as Clean Installation.

<h2>I hope it will help you!</h2>
5 0
3 years ago
Other questions:
  • Fill in the blanks:(a)Every Java program must have at least one ______________.(b)The Java program is executed from _________ me
    12·1 answer
  • Scientific models can be used for a variety of different purposes. Which of the following statements about scientific models is
    7·2 answers
  • Is the jane austen pride and prejudie a primary source
    6·1 answer
  • Which camera mode gives the photographer the greatest amount of control?
    7·2 answers
  • What are the top ten alternative songs of the 2000's?
    7·1 answer
  • What is wrong with the following C++ code? How would you fix it? int sum; for (int i=0; i&lt;1000; ++i) sum += i; { printf("Sum
    5·1 answer
  • Which of the following tools enables a production mixer to sync audio and video?
    7·1 answer
  • A chemical mixture that is burned to produce thrust. (Jet engine homework)
    14·2 answers
  • Which command could you use to change to the /usr directory using a relative pathname?
    8·1 answer
  • What might a designer need to consider when choosing an appropriate energy source for products and power systems
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!