Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.

Get a Professional Answer

Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.

100% Satisfaction Guarantee

Rate the answer you receive.

Ask .Paul Your Own Question

.Paul, Computer Software Engineer

Category: Programming

Satisfied Customers: 44

Experience: 15 years visual basic experience

13558067

Type Your Programming Question Here...

.Paul is online now

Design a While loop that lets the user enter a number.

This answer was rated:

★★★★★

Design a While loop that lets the user enter a number. The number should be multiplied by 10, and the result stored in a variable named product. The loop should iterate as long as product contains a value less than 100.

when you enter a number it multiplies it by 10 + adds it to product. thats the part i'm not sure of. should product just contain the number * 10 or the running total?

when product is greater than 99 the program exits the loop, and the program ends.

yes i can help with your other questions. usually you'd put them in a new question, with a reasonable value (mark it "for .Paul" in the subject), or i can answer them in this thread for a bonus.

Design a program that displays a table of the centigrade temperatures 0 through 20 and their Fahrenheit equivalents. The formula for converting a temperature from centigrade to Fahrenheit is

9

F= --- C+32

5

Where F is the Fahrenheit temperature and C is the Centigrade temperature. Your program must use a loop to display the table.

Design a program with a loop that lets the user enter a series of numbers. The user should enter -99 to signal the end of a series. After all the numbers have been entered, the program should display the largest and smallest numbers entered.

declare integer largest
declare integer smallest
declare integer number

largest = Integer.MinValue
smallest = Integer.MaxValue
number = 0

do while number <> -99
display "Enter a number"
input number
If number <> -99 And number > largest Then largest = number
If number <> -99 And number < smallest Then smallest = number
loop

Design a function named timesTen that accepts an Integer argument. When the function is called, it should return the value of its argument multiplied times 10.

In physics, an object that is in motion is said to have kinetic energy. The following formula can be used to determine a moving object's kinetic energy:

KE = 1/2mv^2

The variables in the formula are as follows: KE is the kinetic energy, m is the objects mass in kilograms, and v is the object's velocity, in meters per second.

Design a function named kineticEnergy that accepts an object's mass (in kilograms) and velocity (in meter per second) as arguments. The function should return the amount of kinetic energy that the object has. Design a program that ask the user to enter values for mass and velocity, and then calls the kineticEnergy function to get the object's kinetic energy.

Design a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows.

(1) When the program begins, a random number in the range of 1 through 3 is generated. If the number is ***** then the computer has chosen rock. If the number is ***** then the computer has chosen paper. If the number is ***** then the computer has chosen scissors. (Don't display the computer's choice yet.)

(2) The user enters his or her choice of "rock," "paper," or "scissors" at the keyboard.

(3) The computer's choice is displayed.

(4) The program should display a message indicating whether the user or the computer was the winner. A winner is selected according to the following rules:

If one player chooses rock and the other player chooses scissors, the rock wins (The rock smashes the scissors.)

If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.)

If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock.)

If both players make the same choice, the game must be played again to determine the winner.