answer.
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
cricket20 [7]
1 year ago
10

Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less

than 100. End each prompt with newline Ex: For the user input 123, 395, 25, the expected output is:

Computers and Technology
2 answers:
nataly862011 [7]1 year ago
4 0

Complete Question:

Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less than 100. End each prompt with a newline. Ex: For the user input 123, 395, 25, the expected output is:

Enter a number (<100):

Enter a number (<100):

Enter a number (<100):

Your number < 100 is: 25

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int n;

       do{

           System.out.println("Enter a number (<100):");

           n= in.nextInt();

       }while(n>100);

       System.out.println("Your number < 100 is: "+n);

   }

}

Explanation:

Using Java programming language

Import the scanner class to receive user input

create an int variable (n) to hold the entered value

create a do while loop that continuously prompts the user to enter a number less than 100

the condition is while(n>100) It should continue the loop (prompting the user) until a number less than 100 is entered.

lara [203]1 year ago
4 0

Answer:

do{

           System.out.println("Enter a number (<100):");

           userInput = scnr.nextInt();

        } while(userInput > 100);

Explanation:

You might be interested in
You need to design a data storage scheme for Hayseed Heaven library data system. There are several hundred thousand large data r
Alekssandra [29.7K]

Answer:

Make use of hash tables

Explanation:

The appropriate thing to use for this should be a hash table.

A Hash Table can be described as a data structure which stores data in an associative manner. In a hash table, data is stored in an array format, where each data value has its own unique index value. Access of data becomes very fast if we know the index of the desired data. So we can perform Hashing on ISBN Number since its unique and based on the Hash Function w ecan store the Information record.

There is no requirement for printing the file in order - HashTables dont store the data in order of insertions, so no problems with that

It becomes a data structure in which insertion and search operations are very fast irrespective of the size of the data. So Querying books details can be fast and searching will take less time.

It can also be pointed out that it wont be too expensive for Hardware implemtation as HashTables stores data based on Hash Functions and memory consumption is also optimal which reduces memory wastages.

7 0
1 year ago
c++ Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is c
Ksivusya [100]

<u>Answer:</u>

<em>int fNumber,scndNumber = -1,  </em>

<em>dup = 0; </em>

<em>do { </em>

<em>cin >> fNumber; </em>

<em>if ( scndNumber == -1) { </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>else { </em>

<em>if ( scndNumber == fNumber ) </em>

<em>duplicates++; </em>

<em>else </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>} while(fNumber > 0 );  </em>

<em>cout << dup; </em>

<u>Explanation:</u>

Here three variables are declared to hold the first number which is used obtain all the inputs given by the user, second number to hold the value of <em>last encountered number and “dup” variable to count the number of duplicate values.</em>

<em>“Do-while”</em> loop help us to get the input check whether it is same as previous input if yes then it <em>adds to the duplicate</em> value otherwise the new previous value if stored.

4 0
1 year ago
Read 2 more answers
Explain why Windows and Linux implements multiple locking mechanisms. Describe the circumstances under which they use spinlocks,
galben [10]

Answer:

The description for the given question is described in the explanation section below.

Explanation:

Depending on the needs of the device programmers these OS have various locking frameworks. Spinlocks become beneficial for preemptive multitasking processes during which a thread will operate in such an active loop instead of risking a rest queue latency. Mutexes become beneficial to utility lockers.

  • Solaris 2 employs flexible mutexes, indicating something like this on preemptive multitasking computers, the mutex is introduced with either a spinning switch.
  • Semaphores and state variations are much more effective methods for consistency where a commodity needs to be managed for such a prolonged period of time because spinning is unstable over a prolonged time.

8 0
1 year ago
Jason works as a financial investment advisor. He collects financial data from clients, processes the data online to calculate t
Ghella [55]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is an online decision support system. Because the decision support systems process the data, evaluate and predict the decision, and helps the decision-makers,  and offer real-time information immediately in making the decision in an organization. So the correct answer to this question is the decision supports system.

Why other options are not correct

Because the transaction processing system can only process the transaction and have not the capability to make the decision for the future. Office support processing system support office work, while the batch processing system process the task into the batch without user involvement.   however, online executive processing does not make decisions and offer timely information to decision-makers in an organization.

3 0
2 years ago
Frank works for an organization that wishes to install a software program on a single server with multiple users connected. Whic
Helen [10]
The best answer to this question should be (A) Cloud Computing.

In general, cloud computing is the term used for the delivery of hosted services over the internet. We can also simply put cloud computing as the delivery of computing services like storage, servers, databases, software and more over the internet.




7 0
1 year ago
Other questions:
  • The most direct way for Jonathan to gain on-the-job experience and earn money while attending school is to apply for:
    5·2 answers
  • Manny is a personal trainer. He gives his client an endurance test each week. He would like to illustrate how much the client ha
    7·2 answers
  • Which of the following best defines the term cross-platform application?(A) A program used to coordinate data sharing among mult
    14·2 answers
  • The Web can play a significant role in making large amounts of information available to decision makers. Decision makers must be
    10·1 answer
  • __________ access control is a form of __________ access control in which users are assigned a matrix of authorizations for part
    8·1 answer
  • A triangular number is a number that is the sum of the integers from 1 to some integer n. Thus 1 is a triangular number because
    11·1 answer
  • Show the stack with all activation record instances, including static and dynamic chains, when execution reaches position 1 in t
    10·1 answer
  • A large Internet merchandise provider determines its shipping charges based on the number of items purchased. As the number incr
    6·1 answer
  • Calvin is an aspiring graphic designer. He wants to achieve Adobe Certified Expert certification in software that will be helpfu
    9·1 answer
  • A credit card company receives numerous phone calls throughout the day from customers reporting fraud and billing disputes. Most
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!