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
Select the correct answer. Adrian sent his manager Stacy an email message that required her immediate attention. Stacy was unabl
zaharov [31]
B. Lack of security
7 0
3 years ago
Read 2 more answers
Your laptop normally connects to your home wireless network automatically, but recently you have to connect to the network manua
finlep [7]
Your software is not remembering your password or SSID , maybe your router also has a forget all setting
8 0
3 years ago
Which of the following would not be stored in a cell ?
Andreas93 [3]

Answer:

D

Explanation:

Because you can put formulas, text and numbers into a salad, but you can not put a chart interrupt because it won't fit in a cell.

5 0
3 years ago
1-5. Discuss briefly the function and benefits of computer network. (5pts​
Elden [556K]

Computer networks allow an unlimited amount of computers to communicate with each other. This is especially useful in enterprise environments, as technicians have to deal with hundreds of computers at a time. Computer networks make it easier to share files, increase storage capacity, better communication, easier to to control computers remotely, easier to share resources, ability to share a single internet connection on multiple devices. Computer networks also have a lot of cost benifits too, as network administration is centralised, meaning that less IT support is required, and you can cut costs on sharing peripherals and internet access.

Hopefully this helps you out!

7 0
3 years ago
What type of redundant storage configuration is most common for hosting the operating system and applications on a server
Ne4ueva [31]

Answer:

RAID 1 is the redundant storage configuration

Explanation:

6 0
2 years ago
Other questions:
  • Mobile providers can be susceptible to poor coverage indoors as a result of: a high degree of latency. network congestion that c
    8·1 answer
  • Pages with obvious problem with functionality or errors in displaying content
    11·1 answer
  • Suggest how the following requirements might be rewritten in a quantitative way. You may use any metrics you like to express the
    7·1 answer
  • Write pseudocode instruction to carry out each of thefollowing computational operations.
    10·1 answer
  • What kind of software program delivers advertising content in a manner that is unexpected and unwanted by the user, and is typic
    14·1 answer
  • How to write a program in java that finds the max number of an array of integers?
    6·1 answer
  • Program 1: I’m buyin’ a Ferrari! If you’ve ever travelled to another country, you know that working with different currencies ta
    6·1 answer
  • An example of a _________________ impact is when a consumer wants to buy a product on the internet but is afraid the company won
    8·2 answers
  • How do you write a multiplication formula in excel with an absolute refrence?
    11·1 answer
  • Describe the fundamental security policies outlined by PCI DSS, FISMA, and COBIT. In a subsequent paragraph, identify at least 2
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!