Write a counter-controlled loop to initialize values

Assignment Help Basic Computer Science
Reference no: EM13952930

Need help trying to figure out counter controlled while loop. I need to write a counter-controlled while loop that uses the loop control variable to take on the values 0 and 10. How do I initialize the loop control variable before the program enters the loop?

In the boy of the loop, I need to multiply the value of the loop control variable by 10 and by 100, then I need to change the value of the loop control variable in the body of the loop.

String head1 = "Number: ";
String head2 = "Multiplied by 10: ";
String head3 = "Multiplied by 100: ";
int numberCounter; // Numbers 0 through 10.
int byTen; // Stores the number multiplied by 10.
int byHundred; // Stores the number multiplied by 100.
final int NUM_LOOPS = 10; // Constant used to control loop.

// This is the work done in the housekeeping() method
System.out.println("0 through 10 multiplied by 10 and by 100" + "n");

// This is the work done in the detailLoop() method
// Initialize loop control variable.
// Write your counter controlled while loop here
// Multiply by 10
// Multiply by 100

Reference no: EM13952930

Questions Cloud

What is a national water footprint : Water use is often measured in units of volumes consumed per time, what is another way to measure water use that is mentioned in the paper? Name an example of an indicator for this alternative measure.
Find probability area bounded by standard deviation units : Assume that we have normally distributed data. From the standard normal table, find the probability area bounded by ±1 standard deviation units about a population mean and by ±1 standard errors about the mean for any distribution of sample means o..
Current profit margins-current cost of benefits : Note that not all of the specifics about the possible acquisition have been given, such as the cost of the acquisition, the number of hotels and employees, the current profit margins, the current cost of benefits as a percentage of total labor cos..
Importance of physician-patient communication : The Importance of Physician-Patient Communication-Explain how miscommunication in physician-patient interaction might impact recovery of a patient
Write a counter-controlled loop to initialize values : In the boy of the loop, I need to multiply the value of the loop control variable by 10 and by 100, then I need to change the value of the loop control variable in the body of the loop.
What is the probability that a sample mean would fall below : Assume the data are normally distributed and normalize the sample mean. What is the probability that a sample mean would fall below 24 days based on this normalized statistic t where the actual standard deviation is unknown and the sample estimate..
Using a loop to perform operations multiple times : What I need help with is to get the dice to roll 100 times instead of just one. So the read file results will show the results of 100 rolls of the dice
When are the values for t and z almost identical : Assume that a distribution of data is normally distributed. For a sample size n = 7, by using a sample mean, which distribution would you employ (t or Z) to make an inference about a population?
How would prison sentencing or the death penalty be affected : If people accepted that all evil is ignorance, what implications would that have on the justice system? How would prison sentencing or the death penalty be affected

Reviews

Write a Review

Basic Computer Science Questions & Answers

  The commonly used password management protocol

Analyze one of the commonly used password management protocol  what is the weakness of this protocol?

  Create function that accepts one input parameter

Using Pseudocode, create your own function that accepts one input parameter and returns a float number. You decide the theme.

  Simplify the following boolean expressions

Simplify the following Boolean expressions. a) xy + (x + y)z + y, b) x + y + (x + y + z), c) yz + wx + z + [wz(xy + wz)]

  Define static binding and dynamic binding

1. Define static binding and dynamic binding and give an example of each. Static binding occurs at compile time and dynamic binding occurs at run time. 2. Describe a situation when a history sensitive variable in a subprogram is useful.

  Task is to design a display with three leds

Your task is to design a display with three LEDs that has the following four modes of operations: Mode 1: Left to right operation 1 - left LED switches ON and then switches OFF, followed by the middle LED, and then the right LED. This sequence repea..

  Describe object management group-s purpose-influence on uml

Investigate the Object Management Group (OMG). Discuss your findings. Describe what it is, its purpose, and its influence on UML and the object approach to systems development.

  Design and implement an application that performs flashcard

The user is to input the answer, and the program will tell them if it is right or wrong. Ask user if they want to do another. Keep score of the user's score of correct answers and the number of problems presented.

  What are preprocessor directives used prevent multiple

What are the preprocessor directives used to prevent multiple includes in C++? Where do you put them in the code

  Developed a blackjack game to read

Developed a Blackjack game to read/print the hint table as it was laid out in the hint text file via console mode.

  What is the difference between using system.data

What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"?

  Similarities between a lumped and a distributed element

What are the differences and similarities between a lumped element and a distributed element. How many steps are required to design a) an RF circuit? b) A microwave circuit?

  Identify thon raw-war, & waw dopondoncios

Rename the registers (below) to prevent dependency conflicts; identify  initial register values by the subscript "a" and subsequent values by sequential alphabetical letters.

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