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
Suppose you are given a data set consisting of nominal attributes, such as color, which takes values such as red, blue, green et
Ratling [72]

Answer:

No, you can´t.

Explanation:

An SVM uses a binary system. In this case the data consists of nominal attributes which can´t be used directly into the SVM.

However, in order to transform this normal attribute into the binary system is necessary to order the information in two sequences, in which the colors are based into two information facts that will give the system the representation that needs.

3 0
4 years ago
Which of the following are incident priorities?
xenn [34]

Answer:

what are the options?

reply in comment so i can help:)

5 0
3 years ago
Time-management techniques work most effectively when performed in which order?
Sholpan [36]

Answer:

study-time survey, project schedule, prioritize tasks, reward system.

Explanation:

Time management can be defined as a strategic process which typically involves organizing, planning and controlling the time spent on an activity, so as to effectively and efficiently enhance productivity. Thus, when time is properly managed, it avails us the opportunity to work smartly rather than tediously (hardly) and as such making it possible to achieve quite a lot within a short timeframe. Also, a good time management helps us to deal with work-related pressures and tight schedules through the process of properly allocating the right time to the right activity.

Hence, time-management techniques work most effectively when performed in the following sequential order; study-time survey, project schedule, prioritize tasks, and designing (creating) a reward system.

4 0
3 years ago
When a job is sent to other countries, as many programming jobs have been, it is said to have been datamined.
OLEGan [10]
<span>When a job is sent to other countries, as many programming jobs have been, it is said to have been datamined. </span><span>
false</span>
6 0
3 years ago
Create your code from the story using code blocks.You must include at least one of each of the following blocks. You can draw or
Mazyrski [523]

Answer:

Como puedo hacerlo.

Explanation:

Me enseñas como hacerlo

6 0
3 years ago
Read 2 more answers
Other questions:
  • Keep getting the message i failed to sign in to email on my phone but i can open my email. whats going on?
    10·2 answers
  • Scott is the CISO for a bank. In recent readings, he read about an attack where the attacker was able to enumerate all the netwo
    9·1 answer
  • Does the game best fiend need wifi to play on the app?
    8·2 answers
  • Digital Subscriber Line (DSL) is the only Internet connection option available for a small office in the middle of nowhere. Whic
    15·1 answer
  • Anyone Free to Talk??????? I'm Bored :(
    6·2 answers
  • How do the steps taken by leaders of Athens reflect a turn towrd democracy
    10·1 answer
  • The large capacity, high-definition optical discs designed to store hi-def video and video games are _______. Group of answer ch
    13·1 answer
  • What is the Purpose and function of the Global Positioning System (GPS)?
    7·1 answer
  • What do we do if IOC is called on the intercom ??
    14·1 answer
  • Ransomware as a service has allowed the increase of:.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!