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
Harlamova29_29 [7]
3 years ago
13

Assume we are testing a variable is_sunny in a while loop. is_sunny = “n”.

Computers and Technology
1 answer:
zubka84 [21]3 years ago
6 0

Answer:

while(is_sunny=="n")

Explanation:

The loop keeps repeating itself until a certain condition is met.

Here while loop keeps executing until value of is_sunny is not equal to 'n'

When the value of is_sunny is not equal to n then the loop stops.

So lets explain this logic with a chunk of code:

#include <iostream> //to use input output functions

using namespace std; //to identify objects like cin cout

int main() {  //start of main function

  string is_sunny = "n"; //value of is_sunny is set to n

  cout<<"Enter value of is_sunny: "; // prompts user to enter value of is_sunny

  cin>>is_sunny; // reads value of is_sunny from user

  while(is_sunny=="n") // keeps iterating until value of is_sunny is not equal to n

  {   cout<<"keep executing until is_sunny is not equal to n"<<endl;//display this message with each iteration

      cout<<"Enter value of is_sunny: "; //keeps prompting to enter is_sunny

      cin>>is_sunny;   } } //keeps reading value of is_sunny from user

Now if the user keeps entering "n" as value of is_sunny then the loop keeps repeating. When the user enters any string other than n then the loop breaks. The output of the program is attached.

You might be interested in
Which of the following words, if it replaced the word "enthusiasts" in the sentence above, would CHANGE the meaning of the sente
Sonja [21]

Answer:

I would need the sentence to make sure that I am correct but I am pretty sure it is C. aficionados

Explanation:

7 0
3 years ago
Which of these is not a sub-claim "Our Clean Power Plan" uses to support its main claim? The CPP protects public health. The CPP
Leno4ka [110]
The CPP cleans the air statement is not a sub-claim of Our Clean Power Plan.

It is the efforts of President Barrack Obama and the U.S. Environmental Protection Agency that has the main goal of lessening to cutting carbon pollution from the present power plants
4 0
3 years ago
Read 2 more answers
It is safe to interchange oxygen and fuel gas hoses. A. False B. True
Marat540 [252]
False.
If you were to interchange one another it would be VERY life threatening.
6 0
4 years ago
Read 2 more answers
Create a public class called Catcher that defines a single class method named catcher. catcher takes, as a single parameter, a F
Cerrena [4.2K]

Answer:

Sorry mate I tried but I got it wrong

Explanation:

Sorry again

6 0
3 years ago
Within program menus, some menu items have an arrow next to them. What will open if you click on that command?
hodyreva [135]
The answer is most probably a subemenu
4 0
4 years ago
Read 2 more answers
Other questions:
  • Microsoft words spell checker
    8·1 answer
  • You work at a computer repair store. You just upgraded the processor (CPU) in a customer's computer. The computer starts, but it
    11·2 answers
  • A virus that propagates using the internet or another computer network is called __________.
    10·1 answer
  • A lead views a specific page on your website, say, your case study page. You then send targeted follow-up content like one of yo
    14·1 answer
  • (TCO 1) You want to find the IP address of an interface. How can you quickly do this?
    7·1 answer
  • True or False?Only flying unmanned aircraft over 20lbs requires preparation and safety calculations.
    8·1 answer
  • The___ is usually the lead in a team of photographers.
    12·2 answers
  • Identify the command on a local desktop CMD that will verify which group policies have been applied to the workstation. SELECT T
    12·1 answer
  • It is common for people to name directories as dir1, dir2, and so on. When there are ten or more directories, the operating syst
    8·1 answer
  • I AM GIVING BRAINLIEST!!!!!!! PLEASE HELP !!!!!!!!
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!