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
A _____ is relatively inexpensive to install and is well-suited to workgroups and users who are not anchored to a specific desk
KengaRu [80]

Answer:

B) wireless local area network (WLAN)

Explanation:

WLAN which fully meaning is WIRELESS LOCAL AREA NETWORK is a network provider that enables two or more mobile phone user , desktop or computer user to connect and have access to the internet by simply connecting to the local area wireless network and this type of wireless network are more cheaper to install.

Example of where WIRELESS LOCAL AREA NETWORK can be found are : School building, Office building, School campus, home, among others.

4 0
3 years ago
C Programming:
natita [175]
This is how to answer this programming question:

#include <stdio.h>
#include <conio.h>

int main(void)
{
   char letterStart;
   
   <span>fflush(stdin);</span>
   printf("Input character: ");
   scanf("%c", &letterStart);
   
   print("Next Letter: %c", ++letterStart);
   
   getch();
   clrscr();
}

7 0
3 years ago
Read 2 more answers
Write a method called removeInRange that accepts four parameters: an ArrayList of integers, an element value, a starting index,
Murrr4er [49]

Answer:

public static void removeInRange(List<Integer> list, int value, int start, int end) {

       for (int i = end - 1; i >= start; i--) {

           if (list.get(i) == value) {

               list.remove(i);

           }

       }

       System.out.println(list);

   }

Explanation:

- Create a method named <em>removeInRange</em> that takes four parameters, a list, an integer number, a starting index and an ending index

- Inside the method, initialize a <u>for loop</u> that iterates between starting index and ending index

- If any number between these ranges is equal to the given <em>value</em>, then remove that value from the list, using <u>remove</u> method

- When the loop is done, print the new list

7 0
3 years ago
Anyone here have Tik Tok?I'm just curious. :) my acc is alexlpark1fanaccount btw thanks!
kiruha [24]
Haircut is my name on tictok
8 0
3 years ago
Which of the following is not ways to fix software in windows 8
RideAnS [48]
Well, this is pretty tricky so lets define all the purposes of these

Safe mode - troubleshoots windows ; determines HARDWARE malfunctions

Check device manager - Highlights malfunctioning hardware that is connected to the P.C.

Refreshing pc - practically nothing

resetting your pc - removes all programs, files, etc. and starts as a new Windows.

I will have to go with answer C.) Refresh your P.C.
7 0
3 years ago
Other questions:
  • "Different links can transmit data at different rates, with the _______ of a link measured in bits/second"
    11·1 answer
  • Solar power plants trap the sun’s energy and convert it into electricity. What is a problem associated with this technology?
    11·1 answer
  • Which type of programmer designs programs for applications executed on the internet?
    10·1 answer
  • What is the purpose of the Occupational Safety and Health Act?
    7·2 answers
  • What is the command to list the contents of directors in Unix- like operating system
    10·1 answer
  • The right to make others do things is referred to as _________.
    14·2 answers
  • How many 1000-Watt lights can be plugged into a standard 120-Volt, 15-Amp outlet? (Hint: W/V=A) *
    7·1 answer
  • What is geolocation?
    8·1 answer
  • HELP 20 points THIS IS ON EDGE IF YOU DON'T KNOW THE ANSWER DON'T RESPOND
    12·2 answers
  • Nathan wants to use the Push transition from left to right in his presentation. After he selects the Push transition, what shoul
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!