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
In-s [12.5K]
1 year ago
12

Suppose a scanner object is created as follows: scanner input = new scanner(system.in); what method do you use to read a real nu

mber?
Computers and Technology
1 answer:
Allushta [10]1 year ago
6 0

Suppose a scanner object is created as follows: scanner input = new scanner(system.in); the method you use to read a real number is Scanner input = new Scanner(System.in); input. nextDouble();

This is because the Scanner input = new Scanner(System.in); input. nextDouble(); command creates the input for a number that contains both whole numbers and decimal numbers and this is why double is used and not int.

<h3>What is a Double in Programming?</h3>

This refers to the fundamental data type that is encoded into the compiler and used to define numeric variables holding numbers with decimal points

Hence, we can see that Suppose a scanner object is created as follows: scanner input = new scanner(system.in); the method you use to read a real number is Scanner input = new Scanner(System.in); input. nextDouble();

This is because the Scanner input = new Scanner(System.in); input. nextDouble(); command creates the input for a number that contains both whole numbers and decimal numbers and this is why double is used and not int.

Read more about double and float here:

brainly.com/question/13260053

#SPJ1

You might be interested in
This might sound crazy! But please help.
aliya0001 [1]

Answer:

You Probably should’nt do that

Explanation:

8 0
2 years ago
a user reports that her computer monitor will not allow her to switch back and forth between Microsoft word and internet explore
san4es73 [151]

Answer: B. Interrupts

Explanation:

Interrupts is a feature of digital computers that enables the interruption of the process the computer is currently engaged in so that the computer can process the new command. Interrupts is the reason I am able to type this answer because interrupts is interrupting my browser to process my typing.

If a user reports that their computer monitor will not allow her or him to switch back and forth between Microsoft Word and Internet Explorer, it is possible that the interrupts function is not working effectively to enable the switch. by interrupting one of the programs.

7 0
3 years ago
What basic drafting instruments are incorporated in a drafting machine?
erastovalidia [21]
It would be the army and then people of nyc
3 0
3 years ago
We want to implement a data link control protocol on a channel that has limited bandwidth and high error rate. On the other hand
Korolek [52]

Answer:

Selective Repeat protocols

Explanation:

It is better to make use of the selective repeat protocol here. From what we have here, there is a high error rate on this channel.

If we had implemented Go back N protocol, the whole N packets would be retransmitted. Much bandwidth would be needed here.

But we are told that bandwidth is limited. So if packet get lost when we implement selective protocol, we would only need less bandwidth since we would retransmit only this packet.

6 0
3 years ago
Will, there be any presents this year
garri49 [273]

Answer:

no why

Explanation:

8 0
3 years ago
Other questions:
  • Which of the following types of cloud platforms would a webmail service offered to the general public be considered?
    9·1 answer
  • You have the following code: string name; cout &lt;&lt; "Enter your name : "; cin &gt;&gt; name; If a user enters "Mary Smith" a
    10·1 answer
  • What is the multiple source test
    15·1 answer
  • This document shows a student's education and career goals and a way to achieve those goals.
    8·1 answer
  • In which conditions, a trial balance does not tally?
    14·1 answer
  • Which two functions can be used with the math module?
    13·1 answer
  • Question #2
    15·2 answers
  • What command can you use if you accidentally delete a sentence in your document?
    13·2 answers
  • Read the following statements and select the
    5·2 answers
  • What is the 6 example of computer hardware and explain​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!