Write a while or do-while loop

Assignment Help Basic Computer Science
Reference no: EM13306837

Given the following code, write a WHILE or DO-WHILE loop that prompt the user for a value on [0, 10]. If the user enters a number on this interval, continue with the program. If the user enters a number that is not on the interval, informatively re-prompt until the user enters an appropriate number.

#include <iostream>
using namespace std;

int main() {
int i = 0, j = 0;

// YOUR CODE GOES HERE

return 0;
}

 

Reference no: EM13306837

Questions Cloud

Write a statement that changes the value of 6 in the array : Write a statement that changes the value of 6 in the array to a 12.
Explain what reaction should be consider superinposed : What reaction should we consider superinposed. Also what is this structures indeterminancy.
Write an output statement that displays the question mark : Write an output statement that displays the question mark from someString followed by a newline.
Which route is attractive by using total investment analysis : The state highway department is considering six routes for a new highway. Listed below are the estimated construction costs, maintenance costs, and the user cost associated with each route.
Write a while or do-while loop : If the user enters a number that is not on the interval, informatively re-prompt until the user enters an appropriate number.
What is the chance of carbon running out on the earth : Deals with the origin of the universe and the Big Bang Theory and what are your thoughts on the origin of the universe and the Big Bang Theory?
Estimate the initial speed of that car assuming a level road : Police investigators, examining the scene of an accident involving two cars, measure 72-m-long skid marks of one of the cars, Estimate the initial speed of that car assuming a level road
What dose equivalent does the patient recieve : A 75 kg patient swallows a 30 micro Ci beta emitter wtih a half life of 5 days. The beta partiles are emitted with an average energy of .35MeV. What dose equivalent does the patient recieve
Determine the discharge through the pipeline : a 2000 m long commercial steel pipe of 200 m diameter converys water at 20 C between two reserviors. the difference in water level between the reserviors is maintained at 50 m.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Write a program that takes in input a set of search terms

write a program that takes in input a set of search terms, connects to Google's search engine, queries for the search terms, retrieves the HTML page containing the search results

  Employees may work from home

Employees may work from home up to 15 hours per week. Each project leader needs a list of current means of contacting each member of the project team: home phone and home FAX number. To contact employees "on the road" the project leaders also need..

  Use css comments to document the css program

Create a css file named style.css to format index.htm and provide a basic layout. Use css comments to document the css program.

  Use strong induction to show that every positive

Use strong induction to show that every positive integer n can be written as a sum of distinct powers of two, that is.

  Issue -internet changed political interactions globally

Write a 500 word essay based on the issue of ways in which the internet has changed political interactions globally. These might involve political activity in several specific countries,

  Give upper bound on number of training

Give an upper bound on the number of training examples sufficient to assure with 90% confidence that the learned perceptron will have true error of at most 5%. Does this bound seem realistic?

  Write this report addressing

Your supervisor has asked you to draft a brief report that describes the "Internal Use Only" data classification standard of Richman Investments.

  Lettuce is used with several types of hamburgers

Q8. Farmer Bob, Farmer Jane and Farmer Jose run a cow farming co-op. For every cow they keep the cow's name, age (or date of birth), breed and numbered plastic ear tag. The each of the three farmers own many cows and share some of the cows wit..

  Write a few lines of code to create a timer in java

Write a few lines of code to create a timer in Java which fires an ActionEvent every 150 msec. Assume the existence of a TimerEventHandler class which needs to respond to timer events.

  Would a sort routine more likely be used with an array

Would a sort routine more likely be used with an array or a linked list? Explain your answer.

  Sequence of events and signals activated

Describe the sequence of events and signals activated when a 6800 device wants to exchange data with the 68000 processor.

  Two-dimensional arr named number of three rows

Given a two-dimensional arr named number of three rows and four columns of type ont, write the nigle code statement that both declare and initialize the arry such that the first row is initialize to 0,1,2,3, the second row is initialized to 4,5,6,..

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