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]
2 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]2 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 is a way to sell the network proposal to management?Group of answer choicestalk about upgrades from 10Mbp
Assoli18 [71]
Ethernet is the best in reliability and speed
5 0
3 years ago
What is the name of a wireless network that allows phones and laptops to connect with pda's using bluetooth communications?
Jlenok [28]
Wireless Personal Area Netwrok (WPAN) or Personal Area Network (PAN)
4 0
3 years ago
2) The CPU is made from a silicon<br>a) Steel<br>b) Chip<br>c) pendrive​
almond37 [142]

Answer:

Address buses are made up of a collection of wires connecting the CPU with main memory that is used to identify particular locations (addresses) in main memory. The width of the address bus (that is, the number of wires) determines how many unique memory locations can be addressed.

Explanation:

6 0
2 years ago
Which of the following is true of functions?
Stella [2.4K]
The correct answer is C
7 0
3 years ago
Read 2 more answers
Atmospheric _______ prevents most gamma ray, x-ray, ultraviolet, and infrared light from reaching the surface of earth.
Diano4ka-milaya [45]
A. Opacity
Hope that helps.
6 0
3 years ago
Other questions:
  • The columns of a spreadsheet data source are A. form letters. B. the mailing list. C. data points. D. fields.
    12·1 answer
  • In modern computer memory, each location is normally composed of one byte.
    7·1 answer
  • What is the purpose of ergonomics in the workplace? A.Keep workers safe and injury free
    5·2 answers
  • Matt expects to get his first paycheck today. What deductions may be listed on his paycheck stub?
    11·1 answer
  • Why are you unable to modify the budget file, when you have the allow full control ntfs permission?
    5·1 answer
  • Why can't I register for Brainly?? I've been trying for months, too! I've noticed this question has been asked so many times, bu
    7·1 answer
  • The
    6·1 answer
  • A computer reads a sequence from top to bottom and left to right.
    13·1 answer
  • Based on the information in the table, which of the following tasks is likely to take the longest amount of time when scaled up
    14·1 answer
  • Write Python code that prompts the user to guess Heads or Tails. Your code will continue to display the results and prompt the u
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!