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 two tasks are associated with router hardening? (choose two.)?
nexus9112 [7]

Disabling unused ports and interfaces.

Securing administrative access.

Router hardening means that the router is secured against attacks as best as possible. Router hardening is one among the three areas of router security that must be maintained to secure an edge router at the network perimeter. Basically, router hardening secures from tough-to-crack passwords, to the shutting down of unnecessary interfaces, ports, and services. Look for any unused router interfaces and disable them by issuing the shutdown command. Disabling unused services typically include BOOTP, CDP, FTP, TFTP, PAD, and a few others. You can also disable administrative and management protocols currently not being  like HTTP or HTTPS, DNS, and SNMP.

8 0
3 years ago
Se citește un număr natural nenul N. Se umple, pe linii, partea de sub diagonală, inclusiv aceasta, a unui tabel pătratic de dim
frozen [14]
<span>The periodic.out file with the following structure: on the first and the only line the S value with the meaning in the enunt. 
<span>Restrictions and specifications  1 <= N <= 1000, 1 <= L <= 10.000.000, 1 <= C <= L.</span></span>
6 0
3 years ago
(Financial application: compound value) Suppose you save $100 each month into savings account with an annual interest rate of 5%
Nostrana [21]

Solution:

initial = float(eval(input('Enter the monthly saving amount: ')))

x = (1 + 0.00417)

month_one = initial * x

month_two = (initial + month_one) * x  

month_three = (initial + month_two) * x  

month_four = (initial + month_three) * x

month_five = (initial + month_four) * x  

month_six = (initial + month_five) * x  

print('The sixth month value is: '+str(month_six))  

Don't forget the saving amount, and initialize the balance with that amount. Inside the loop, work out and add the interest and then add the saving amount for the next month.

balance = 801

for month in range(6):

  balance = balance * (1.00417)

print(balance)

7 0
3 years ago
In which of the following scenarios would you choose to embed versus import data?
MrRissso [65]

Answer:

B.)You want to maintain connections with external files

Explanation:

6 0
3 years ago
How can you determine if the story is told in the third person
Zolol [24]

Answer:

They use pronouns like They, Them, He, She, It.

6 0
3 years ago
Other questions:
  • Which ethernet cabling standard defines an ethernet network that uses cat 3 or better utp cabling, operating at 10mbps?
    8·1 answer
  • Advantages of a personal area network
    5·1 answer
  • An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicle
    12·2 answers
  • What portable computing devices, designed for user convenience, have a sensor called an accelerometer that senses vibrations and
    10·1 answer
  • Help please and thank you
    11·1 answer
  • Given the scenario, before leaving the office, you ask the CIO to provide which formal document authorizing you to perform certa
    11·1 answer
  • Software that displays advertising material when online.
    12·2 answers
  • Write a java program to read elements in an array from user and count total number of duplicate elements in array.
    12·1 answer
  • Complete the sentence.
    10·1 answer
  • The largest group of Linux users is likely to be
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!