1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ivahew [28]
3 years ago
8

1. Write a while loop that lets the user enter a number. The number should be multiplied by 10, and the result assigned to a var

iable named product. The loop should iterate as long as product is less than 100
Computers and Technology
1 answer:
shutvik [7]3 years ago
3 0

Answer:

import java.util.Scanner;

public class num6 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int product=0;

       do{

           System.out.println("Enter a number");

           int num = in.nextInt();

           product = num*10;

           System.out.println("The product is " + product);

       }while (product<100);

  }

}

Explanation:

In the Java program above, The user will be prompted to enter a number.

The number is multiplied by 10 and assigned to a variable called product.

A do....while loop has been implemented to check the variable product

As long as this variable is less than 10, the user will be prompted to enter another number.

You might be interested in
A cathedral hull allows the boat to do what
Hoochie [10]
It allows power boats to have stability while cruising. The cathedral hull  is like a trimaran in terehat it has one main  and two side hulls stuck together so that has a somewhat square to rectangular shape and therefore exhibits greater stability than a single hulled boat. It became more popular with the advent of fibreglass boats in the 1960's and '70s.
5 0
3 years ago
A _______________ is a field that contains data unique to a record.
Andru [333]

A primary key is a field that contains data unique to a record

8 0
3 years ago
Which of these strategies do you practice when tests are returned to you? Check all that apply.
victus00 [196]

Answer:

I apply numbers...

5, 6 and 3

7 0
2 years ago
Read 2 more answers
Hi! Can you guys help me with these Java programming questions?
olchik [2.2K]
5. Answer 4
6. Answer 2
7 0
4 years ago
Declare an array of int values westboundHollandTunnelTraffic that can store the number of vehicles going westbound through the H
Len [333]

Answer:

Following are the declaration of the array:

int westboundHollandTunnelTraffic [10] [52] [7] [24];  //defining an integer array  that holds days, week, hour, and year value

Explanation:

In the above-given code, an array that's name is " westboundHollandTunnelTraffic " is declared and the type of the storing elements in the array is an integer.

In this array, it first stores the year's value, and in second, it stores week values, in third, it stores day value, and the last it stores hours value.    

6 0
4 years ago
Other questions:
  • Write a program named TypingGrades that allows a user to enter a student’s number of words typed. The output is the letter grade
    9·1 answer
  • What happens when a Boolean expression is evaluated?
    7·1 answer
  • If you want to wrap text so that it fits a particular cell size, which formatting section would you use?
    9·2 answers
  • Which of the following statements about these signs is true?
    13·1 answer
  • What do “phone-copying” systems allow investigators to do?
    9·1 answer
  • Just letting all my friends know, i am deleting this account and making a new one same username and profile picture so you know
    6·2 answers
  • HURRY- I’ll give 15 points and brainliest answer!!
    10·2 answers
  • Question 1 of 10
    14·2 answers
  • PLSS HELP ASAP ILL GIVE BRAINLIES THANKS
    7·2 answers
  • Check image dont answer if you dont know please
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!