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

  Create three integer variables and initialize them

Create three integer variables and initialize them to whichever value you'd like. ? Create three functions: ? A function that accepts two integers as parameters and subtracts the second from the first.

  Hierarchy chart and then plan the logic

Draw the hierarchy chart and then plan the logic for a program needed by the sales manager of The Henry Used Car Dealership. The program will determine the profit on any car sold

  Problem of traveling from one city to another

Describe how the problem of traveling from one city to another could be framed as a production system. What are the states? What are the productions?

  Explaining rea modeling and rea diagrams

REA data modeling does not include traditional accounting elements such as ledgers, chart of accounts, debits and credits.

  Select processor or disk for economical view

Similary there is set of disk drives for $7000 which promises two and half times the throughout of your existing disks. Then in economical view whether processor or disk is to select for your computer?

  Write a program prompts user to enter the first digits

Need help to write problem displaying ISBN(international standard book numbers). Question as follows:

  What is the purpose of modular design

what's the purpose of modular design ?? why do we break dows circuits into modules and design them independently ?? good answer please

  Determine size of one minute mono audio file

Digital audio transducer samples real sound at the rate of 40 kHz and assigns 8 bits to each sample. Determine the size of one minute mono audio file?

  Support desktop computers in small company

Static IP address of server is 192.168.45.200. Employees will open their Web browser and enter personnel.mycompany.com in URL address box to browse Web site.

  Create the new instance of problem with graph

Assume we replace each edge cost Ce by its square, Ce^2, thereby creating the new instance of problem with same graph but different costs.

  Determine integer to divide maximum number of partial sums

Now, given sequence, can you determine the integer M (L ≤ M ≤ U) which divides maximum number of partial sums of the sequence?

  Control that programmee with key

Please control that programmee with key (left ,right ,up and down ) and also make a chain of snake when eat egg,and game over when snake strike with hurdel.

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