Correct code so that it finds the sum of 20 numbers

Assignment Help C/C++ Programming
Reference no: EM13338680

Correct the following code so that it finds the sum of 20 numbers.

sum=0

while (count < 20)
cin >> num;
sum = sum + num;
cout++;

 

Reference no: EM13338680

Questions Cloud

Solve equation with a graphing calculator : How can i solve this equation with a graphing calculator
What is visual imagery : What is visual imagery? What happens in your brain when you create visual images with your eyes closed? How does the experience of imagery compare to the experience you have when you see the actual object?
Calculate the lowest energy of the electron in he : (a) Calculate the lowest energy of the electron in He+. Is it lower than that of H (b) If this electron absorbs a photon and makes a transition to the 2p orbital
Different levels within a category : What does it mean to say that there are different levels within a category?  What are the arguments that support the notion that there are privileged levels within categories.  In your original answer be sure to describe an object with regard to spec..
Correct code so that it finds the sum of 20 numbers : Correct the following code so that it finds the sum of 20 numbers.
Computation of amount of rentals : Computation of Amount of Rentals
Calculate the expectation value of the potential energy : Calculate the expectation value of the potential energy of the H atom with its electrons in the 1s orbital. Compare this with the total energy.
What is the average value of the orbital angular momentum : What is the average value of the orbital angular momentum, L, for the hydrogen atom if the electron is in the 3d orbital? Note that the average value of L can be written as = ^(1/2).
What is length of bungee cord just as two skater reach : The bungee cord acts just like a coil extension spring with constant k = 4 lbf/ft and its unstretched length is L= 6 ft. At first the cord is loosely dangling but then becomes taut and goes into tension as soon as the skaters

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create class that allows you to generate number of plants

In your driver, you should create at least 2 different plants, after you instantiate a plant, you should print out the information about the plant, then water the plant at least three times and then print out the plant again.

  Write a program to implement a simple batch operating system

Write a program C/C++ to implement a simple batch operating system. Develop a simple loader, scheduler, memory manager, and shell.

  Program to compute diameter in centimeters of a steel rod

Write a program to compute the diameter in centimeters of a steel rod, an aluminum rod, and a copper rod, which can withstand a particular compression load.

  Write a scanf statement to read in one number (int

1) Write a scanf statement to read in one number (int), and another statement to print out that number.

  A store with a bag of groceries

write C++ statements that remove all the items from storeBag and place them into one of two new bags, as follows: Place all occurrences of bread and eggs into fragileBag, and all other items into groceryBag. When you are done, storeBag should be empt..

  We wish to process survey results

Suppose we wish to process survey results that are stored in a file. This exercise requires twoseparate programs. First, create a program that prompts the user for survey responses and outputseach response to a file

  Write a program that calculates the average rainfall

Write a program that asks the user to enter five floating-point numbers. The program should create a file and save all five numbers to the file.

  Write a program to calculate students average test scores

Write a program to calculate students average test scores

  Write a program that sorts a linked list

Write a program that sorts a linked list of integers using merge sort. the program will read the integers froma file onto a linked list and then sort the linked list using MERGE SORT. this will require additional linked lists but you should use li..

  Write c function to sort one dimensional integer array

Consider the values sorted in the array. Sort it in ascending order using Bubble sort technique showing all iterations: write C function to sort one dimensional integer array in ascending order.

  Two for loops that will calculate the sum of all even number

Write a program using two for loops that will calculate the sum of all even numbers between 2 and 100,

  Wave steepness is the ratio of wave height

Wave steepness is the ratio of wave height (WH) to wave length(WL) and is an indicator of wave stability. When wave steepness exceeds a 1/7 ratio; the wave becomes unstable and begins to break. Assume a data file exits with the following header

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