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
An administrator needs to set up an authentication server for users connecting to a network through a VPN. What kind of server c
nalin [4]

Answer:

RADIUS

Explanation:

RADIUS is the networking protocol that is used for the purpose of authentication to access the network resources. The full form of RADIUS is Remote Authentication Dial In User Service. It is used by different organizations, which setup their own network that can be accessible through VPN, DSL or modems through different networks. The purpose of this protocol is to establish the security and authentication mechanism by organization itself.

So, If an administrator needs to set up an authentication server for users connecting to a network through a VPN, he should establsih the RADIUS based Server.

3 0
3 years ago
Find what the secret message is. Get Brainliest if you are fast and correct.
Firdavs [7]

Answer:

What does your digital footprint say about you?

Explanation:

Just follow the path from the end to the start, that's how I always get mazes.

8 0
2 years ago
Read 2 more answers
How do you get past a firewall ?
DaniilM [7]
Use a Web-based Proxy. ...
Use a VPN. ...
Use Remote Access to Your Own PC. ...
Kill the Blocking Service. ...
Use Mobile Data as a Stopgap. ...
What if You're Using a Phone? ...
Sneaky Like a Boss.
3 0
3 years ago
(Type the correct answer in the box.)
mihalych1998 [28]

1. If in MS Access, Click on Query design, select the required Table.

 In Field select required field, in this case Select [Name of Plants]. Click on Order and set it as Ascending / Descending.

2. If you want to write a Query that it will look like this

SELECT MedicinalPlants.Name of the plantsFROM MedicinalPlantsORDER BY MedicinalPlants.Name of the Plants;

Read more on Brainly.com - brainly.com/question/3433328#readmore

4 0
3 years ago
Read 2 more answers
Signs that a listener is paying attention include:
Tomtit [17]
Eye contact, Taking notes, being quiet.I mean there is a lot of ways
6 0
3 years ago
Read 2 more answers
Other questions:
  • What will be displayed after the following statements have been executed? int x = 15, y = 26, z = 32; x = x + 12; y = y/6; z -=
    15·1 answer
  • Who should get the copyright credit for a piece of computer art: the CPU, the software, or the programmer? Explain your reasonin
    7·1 answer
  • If you wanted to make certain numbers in a spreadsheet stand out, you should _____.
    11·2 answers
  • Which company operates a public cloud?<br><br> Lotus<br> Acme<br> Google<br> Symantec
    5·2 answers
  • An IT specialist is consulted about setting up a peer-to-peer network. What would the specialist say about security risk in this
    14·2 answers
  • Betrand Meyer developed the ______ programming language which is not type-safe because it violates the law of contravariance.
    9·1 answer
  • __________ is a growing practice in cooperative farmingassociations to pool and sell the fruit as a common commodity underthe br
    6·1 answer
  • The _____ component of a decision support system (DSS) includes mathematical and statistical models that, along with the databas
    14·1 answer
  • How can learning opportunities for AI be extended to all
    6·1 answer
  • Silas develops this algorithm to compute the calories burned for an activity for a given number of minutes and body weight: If t
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!