Write a program that uses a while loop to compute

Assignment Help Basic Computer Science
Reference no: EM13322284

Write a program that prints the numbers from 1 to 50 using a for loop. Rewrite the program using a do -while loop.

Write a program that uses a while loop to compute and print the sum and the average of the numbers entered from the keyboard one at a time.The program stops when the value entered is -99.

 

Reference no: EM13322284

Questions Cloud

Find the potential difference between the end of the wire : The electric field inside a 28.41-cm-long copper wire is 0.021 V/m. What is the potential difference between the end of the wire
Determine what would be the expected flow velocity : A 12-in diameter concrete culvert (n=0.013) flows half full and is constructed on a grade of 0.5 %. What would be the expected flow velocity
Determine what is the rate of discharge with rubble masonry : A 5-m wide rectangular open channel lined with rubble masonry (n=0.025) and laid on a slope of 0.0004. If the depth of flow is 3 m, what is the rate of discharge (m3/s)
Berkshire inc. uses a periodic inventory system : Berkshire Inc. uses a periodic inventory system. At the end of 2012, it missed counting some inventory items, resulting in an inventory understatement by $600,000. Assume that Berkshire has a 30% income tax rate and that this was the only erro..
Write a program that uses a while loop to compute : Write a program that prints the numbers from 1 to 50 using a for loop. Rewrite the program using a do -while loop.
Find range of values of p for which equilibrium is maintain : knowing that the coefficient of static friction between the collar and the rod is .35, determine the range of values of p for which equilibrium is maintained when 0=50deg and M=20Nm
What is the resistance of the composite wire : A 137-cm-long wire is made by welding a 1.3-mm-diameter, 26-cm-long copper wire to a 0.31-mm-diameter, What is the resistance of the composite wire
What is the controlling interest in consolidated : 40. Keefe Inc, a calendar-year corporation, acquires 70% of George Company on September 1, 2014, and an additional 10% on January 1, 2015. Total annual amortization of $6,000 relates to the first acquisition. George reports the following figur..
How a non-it senior manager would arrive at the decision : Describe the process of how a non-IT senior manager would arrive at the decision to support one IT diffusion model over another. List the factors that would have to be considered. Determine which model you would choose and explain why.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What are some domains in which they can be used

What are some domains in which they can be used? Justify your answers with examples and reasoning.

  What is the minimum required frame length for this ethernet

Assume that two nodes in a 10Mbps Ethernet cable are 1200 meters apart. Also assume that the signal propagation speed is 2 x 10 8 meters/second. What is the minimum required frame length for this Ethernet?

  How linear program the problem of finding the maximum profit

Formulate as a linear program the problem of finding the maximum profit weekly production mix. Solve the linear program from Part A using the Simplex method.

  Why are organizations important to continual learning

Why are professional organizations important to continual learning? What professional organizations benefit both the employee and the employer.

  Write algorithm to save few new phone numbers

write algorithm to save few new phone numbers in the address book of cell phone. algorithm should work even if there's only one new phone number or several new phone numbers to save. ke sure to handle the scene if the address book is full.

  The selector is used to match any element in the hierarchy

The  selector is used to match any element in the hierarchy.

  Design the class doctortype

Design the class doctorType, inherited from the class personType, with an additional data member to store doctors speciality. Add appropriate constructors and member functions to initialize, access, and manipulate the data members.

  Create an employee class with two fields

Create an Employee class with two fields-IDNum and hourlyWage. The Employee constructor requires values for both fields. Upon construction, throw an ArgumentException if the hourlyWage is less than $6.00 or more than $50.00.

  Create a web archive file and attach to this assignment

Name your JSP FormPost4 and name the application Week7. Create a Web archive file and attach to this assignment.

  Calculate the average of first 8 numbers

Write a C++ program that: Calculate the average of first 8 numbers divisible by 3 or 5, but not 6 and 10. please send me the correct code first you try , i mean run and compile the code by yourself if it works then post it to me ,else i don't need..

  Advantages of the database approach

What are the advantages of the database approach over the traditional approach to database management? What is a data center, and why are they becoming increasingly important

  Explain the concept of supply chain management

Explain the concept of supply chain management. Although R/Way offers services rather than products, could that concept apply to the design of R/Way's new system? If so, how?

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