What is the output from the following c++ code fragment

Assignment Help Basic Computer Science
Reference no: EM13235025

What is the output from the following C++ code fragment if the following values are the inputs to cin? 38 35 71 14 -1 int sum, num; sum = 0; cin >> num; while(num != -1) { sum += num; cin >> num; } cout << "Sum = " << sum << endl; 5. Write a do - while loop to get 20 numbers from the user and sum them together. Output the sum after the loop. Declare any variables you need.

Reference no: EM13235025

Questions Cloud

Calculate bobs economic profits at the activity level : Competitive Strategy. Bob Ice owns and operates Bob's Music Center, Ltd., a small firm that offers music lessons in Huntsville, Alabama. Given the large number of competitors and the lack of entry barriers
What is the maximum height the ball goes above the ground : A soccer ball is kicked with an initial horizontal velocity of 18 m/s and an initial vertical velocity of 13 m/s, What is the speed of the ball 0.8 seconds after it was kicked, What is the maximum height the ball goes above the ground
Explain what mass of sodium formate is required : You need to produce a buffer with pH = 4.1 by dissolving a weighed amount of sodium formate (FW = 68.0072) in 500-mL of 0.45-M formic acid
Calculate the nash equilibrium contributions for each firm : Two construction companies are lobbying to obtain a share of work on repaving city streets. The share of the project going to each firm depends on money contributions to the mayor's reelection fund. The project has value V in total.
What is the output from the following c++ code fragment : What is the output from the following C++ code fragment
Explain salt bridge completes the electric circuit : If you are performing a Zinc-Copper Galvanic Cell where Zn is the Anode and Cu is the cathode and you soak the salt bridge with a saturated ammonium nitrate solution, in which direction would the ammonium ions move when the salt bridge completes t..
Find the standard time for the process : On the basis of these observations, find the standard time for the process and they also believe that there will be an 80% learning rate. How many hours of labor should Joe include for his bid?
What is the output from the following c++ code fragment : What is the output from the following C++ code fragment
Find the speed of the plane : A 0.58 kg toy airplane is suspended from the ceiling by a 1.6 m cord and rotates in a horizontal circle, Find the speed of the plane, Find the tension in the cord

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explaining leverage data from across enterprise

Many companies have executed ____________ to enable managers and knowledge workers to leverage data from across enterprise.

  Describing online services provided by selected companies

Identify and briefly describe the online services provided by the selected companies (e.g. online catalogue search, online information search.

  Describe method to keep the data local caches in sync across

describe method to keep the data local caches in sync across multiple processors (i.e. cache coherence). discuss implementations issues

  Validate a field for minimum length

Write a JavaScript program that performs the following actions (in sequence, step-by-step):

  Event drive programming

Lets look at event drive programming. What is an event driven program? What are events associated with? What are examples of common events?

  Voluntarily gravitating to give up our real world experience

In an age of virtual worlds where people are spending inordinate amounts. Are we voluntarily gravitating to this world and giving up our real world experiences for virtual ones?

  Use a single if statement and boolean operators

Write a program that asks the user for a year and computes whether that year is a leap year. Use a single if statement and Boolean operators.

  Averages ten homework grades entered

Write a program that averages ten homework grades entered by the user. Allow for a bonus homework grade that can count as 5 extra points on their average. Create at least two functions (excluding main() ) in your program. In the first function, pr..

  Identify and evaluate two online stores

Identify and evaluate two online stores that sell business furniture. Briefly summarize your findings.

  Describe why analyst needs to understand how people think

Describe why an analyst requires to understand how people think, how they learn, how they react to change, how they communicate, and how they work.

  Tools or tactics for risks for computing infrastructure

As part of project to assess security risks for computing infrastructure, you have found that other managers often have different idea. List any tools or tactics that could be used.

  What is the name of the keyboard

research the Internet and find out all that you can about the keyboard layout that you are using. Then write me a one page essay on what you found.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd