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
LAB: Plant information (ArrayList) Given a base Plant class and a derived Flower class, complete main() to create an ArrayList c
sashaice [31]

Answer:

LAB: Plant information (ArrayList) Given a base Plant class and a derived Flower class, complete main() to create an ArrayList called myGarden. The ArrayList should be able to store objects that belong to the Plant class or the Flower class. Create a method called printArrayList), that uses the printinfo methods defined in the respective classes and prints each element in

4 0
3 years ago
Hw to gain more knowledge ​
LenaWriter [7]

Answer:

Read Books, Search the Internet, etc...

Explanation:

6 0
3 years ago
How will Mario know which words are misspelled in his document?
netineya [11]

Answer:

By seeing if there are any red lines under the words or go to tools.

Explanation:

Sometimes when you spell something wrong, there will be a red line under it. If not, and you're are not sure if it's correct, go to "tools" then select spelling and grammar then it'll give you corrections if they need to correct anything.

5 0
3 years ago
Read 2 more answers
Why is a Quality assurance tester needed on a software development team?
arsen [322]

Answer:

Quality assurance testing plays a very crucial role in the process of software development. It saves money and time by spotting bugs and errors early in the software development life-cycle. Software that is newly developed may have inconsistencies, redundancies, and flaws; therefore, proper QA testing is mandatory.

Explanation:

3 0
2 years ago
How to play Drinkopoly game?
professor190 [17]
Answer:
Never heard of that lol
3 0
2 years ago
Other questions:
  • Tower defense is included under which genre of game
    15·2 answers
  • An array UnsortedInt consists of integers in random order. Another array SortedInt consists of a sorted list of integers.
    13·1 answer
  • In this digital age of rapid communications, how can you justify the time it takes to stop and revise a message
    10·1 answer
  • Jason works as an accountant in a department store. He needs to keep a daily record of all the invoices issued by the store. Whi
    13·2 answers
  • Scavenging is a form of fraud in which the perpetrator uses a computer program to search for key terms in a database and then st
    14·1 answer
  • When you write a C# program that stores a value in a variable, you are using temporary storage; the value you store is lost when
    12·1 answer
  • Select the answer that best describes the activity
    5·2 answers
  • Cisco Next Generation Intrusion Prevention System (NGIPS) devices include global correlation capabilities that utilize real-worl
    9·1 answer
  • Help with this please anyone
    15·2 answers
  • We can save our data peremently on a
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!