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
Greeley [361]
4 years ago
14

Initialize an int variable named as sum to 0. Write the while loop that lets the user enter a number. The number should be added

to sum and the result is stored back to the variable sum. The loop should iterate as long as sum contains a value less than 200. After the loop stop, display message: "sum = - the loop stops"
Computers and Technology
1 answer:
FromTheMoon [43]4 years ago
8 0

Answer:

Following are the program to this question:

#include<iostream> //defining header file

using namespace std;  

int main() //defining main method

{

int sum = 0, num; //defining integer variable  

cout << "Enter a number :"; // print message

cin >> num; //input number

sum=sum+num;

while (sum < 200)  //defining loop that check sum value is less then 200

{

cin >> num; //input number by user

sum =sum+num; //add values

}

cout << "Sum = " << sum <<" the loop stops"; //print values

return 0;

}

output:

Enter a number :44

66

90

Sum = 200 the loop stops

Explanation:

In the given C++ program, the main method is declared, inside the method two integer variable "sum and num" is declared, in which sum variable assign a value, that is 0, and num is used to take input from the user end.

  • In the next step, a sum variable adds num variable value and use a while loop that checks value is less than 200.  
  • In this condition is not true so, inside the loop, it takes value from the user and into the sum variable when its value is above 200, it will exit the loop and prints its total value.
You might be interested in
With _______, applications are owned, delivered and managed remotely by one or more providers over the Internet or an intranet,
vfiekz [6]

Answer:

EMAIL

Explanation:

3 0
3 years ago
Need the answer ASAP plz !!!!!
Evgesh-ka [11]
Performance would be the answer
3 0
3 years ago
A user logs into Active Directory on a workstation and the user home directory does not redirect to a network share on a file se
inysia [295]

Answer:

gpresult

Explanation:

Group Policy provides the system administrator with settings that would be necessary to manage the different user accounts available in an organization. It also controls their work environment centrally by configuring the user Operating System (OS), applications and user accounts.

Group policy settings or configurations are referred to as Group Policy Objects (GPOs). These objects can be linked to organizational units (OUs), domains or sites.

There are various group policy commands such as;

  1. rstrui (System Restore tool will run),
  2. runas (using different permission to run a tool or program),
  3. tasklist (currently running programs are shown
  4. gpupdate (Group policies are refreshed)
  5. gpresult (group policy configurations are displayed for verification)

gpresult command can be used to verify the group policy configurations for adjustment or optimization. The technician can start troubleshooting from viewing the active settings, then running the rstrui to start the System Restore utility to restore the computer to an earlier date

6 0
3 years ago
In risk management what does risk evaluation involved
VLD [36.1K]

Answer:

Explanation:Risk management is the decision-making process involving considerations of political, social, economic and engineering factors with relevant risk assessments relating to a potential hazard so as to develop, analyze and compare regulatory options and to select the optimal regulatory response for safety from that hazard.

5 0
3 years ago
Which of the following is true about sorting functions?
il63 [147K]

Answer: Option D -- Sorting an already sorted array of size n with quicksort takes O(n log n) time.

Explanation:

Sorting an already sorted array of size n with quicksort takes O(n log n) time is true about sorting functions while other options are wrong.

8 0
3 years ago
Other questions:
  • Chris has just graduated from high school. He hopes to complete a carpenter's apprenticeship and eventually open his own busines
    9·2 answers
  • What is a device driver?
    9·2 answers
  • loop Write a program to read a list of exam scores given as integer percentages in the range 0 to 100. Display the total number
    5·1 answer
  • In the structure of a conventional processor, what is the purpose of the data path?
    15·1 answer
  • You can apply several different worksheet themes from which tab?
    10·2 answers
  • Dan works for an automobile company. He has designed a new model of a car based on an older version. Which technology can he use
    6·1 answer
  • Similarites between hardware and software
    9·1 answer
  • Suppose L is a LIST and p, q, and r are positions. As a function of n, the length of list L, determine how many times the functi
    8·1 answer
  • The add_prices function returns the total price of all of the groceries in the dictionary. Fill in the blanks to complete this f
    15·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!