Write a complete Java program called Rooter that gets a positive integer called "start" from the user at the command line and then finds the squareroot of every number from "start" down to 0. Use a while loop to count down. Print each square root on a separate line. Include data validation to ensure the user provides a positive integer. Assume that the user enters an integer, and for validation, just check to be sure it is positive. If the validation is not passed, provide the user with suitable feedback and stay in the program to let the user try again until valid input is received. Use the Math.sqrt(double a) method to find each square root.

Answers

Answer 1

Answer:

The program in Java is as follows:

import java.util.*;

import java.lang.Math;

public class Rooter{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 int start;

 System.out.print("Start: ");

 start = input.nextInt();

 while(start<=0){

     System.out.print("Number must be positive\nStart: ");

     start = input.nextInt();  }

 while(start>=0){

     System.out.println(Math.sqrt(start));

     start--;  }

}

}

Explanation:

This declares start as integer

 int start;

This prompts the user for input

 System.out.print("Start: ");

This gets input for start

 start = input.nextInt();

The following is repeated until the user input is valid i.e. positive

 while(start<=0){

     System.out.print("Number must be positive\nStart: ");

     start = input.nextInt();  }

The following while loop prints the square root of each number till 0

 while(start>=0){

     System.out.println(Math.sqrt(start));

     start--;  }


Related Questions

Prolog uses ____. Select one: a. lowercase for variable names, and uppercase for constants and functions b. uppercase for variable names, and lowercase for constants and functions c. lowercase for variable names and constants, and uppercase for functions d. uppercase for variable names and constants, and lowercase for functions

Answers

Answer:

b) uppercase for variable names, and lowercase for constants and functions  

Explanation:

Given

Programming language: prolog

Required

The case type for variables, constants and functions

In prolog,

Variable names begin with uppercase

e.g. Name, NAME

While constants and functions begin with lowercase

e.g. name, addnumbers()

Hence, (b) is correct

Which vendor owns the software platform Fusion?
A.
Microsoft
B.
Apple
C.
SAP
D.
Oracle

Answers

Answer: D

Explanation:

D. Oracle owns the software platform Fusion

Computers work on the garbage-in, garbage-out concept. Comment

Answers

Stands for "Garbage In, Garbage Out." GIGO is a computer science acronym that implies bad input will result in bad output.

Because computers operate using strict logic, invalid input may produce unrecognizable output, or "garbage." For example, if a program asks for an integer and you enter a string, you may get an unexpected result. Similarly, if you try to open a binary file in a text editor, it may display unreadable content.

GIGO is a universal computer science concept, but it only applies to programs that process invalid data. Good programming practice dictates that functions should check for valid input before processing it. A well-written program will avoid producing garbage by not accepting it in the first place. Requiring valid input also helps programs avoid errors that can cause crashes and other erratic behavior.

NOTE: Because the related terms FIFO and LIFO are pronounced with a long "i," GIGO is typically pronounced "guy-go" (not gih-go). This also helps avoid confusion with the prefix "giga," which is pronounced with a soft "i."

Write a program to input the TotalCost and display the Assured gift as per the following criteria TotalCost(TC) Assured Gift Less than or up to 2000 Wall Clock 32001 to 5000 School Bag 5001 to 10,000 Electric Iron More than 10,000 Wrist Watch​

Answers

Answer:

The program in Python is as follows:

TotalCost = int(input("Total cost: "))

if TotalCost <= 2000:

   print("Wall Clock")

elif TotalCost >= 2001 and TotalCost <= 5000:

   print("School Bag")

elif TotalCost >= 5001 and TotalCost <= 10000:

   print("Electric Iron")

else:

   print("Wrist Watch")

Explanation:

This gets input for total cost

TotalCost = int(input("Total cost: "))

If the total cost is up to 2000, print wall clock as the assured gift

if TotalCost <= 2000:

   print("Wall Clock")

If the total cost is between 2001 and 5000 (inclusive), print school bag as the assured gift

elif TotalCost >= 2001 and TotalCost <= 5000:

   print("School Bag")

If the total cost is between 5001 and 10000 (inclusive), print electric iron as the assured gift

elif TotalCost >= 5001 and TotalCost <= 10000:

   print("Electric Iron")

If the total cost is more than 10000, print wrist watch as the assured gift

else:

   print("Wrist Watch")

True or false we can used virus not use pirated software and programs ​

Answers

Answer:

False i guess

NBA bank uses centralized client server database that is accessed by all its nationwide branches. All customers' records are stored on the database. There are no copies at the branches. The building that holds this database and all the equipment went up in flames and was destroyed.

Answers

Answer:

NBA bank data is completely destroyed since it has not maintained any backup.

Explanation:

All businesses should maintain backup of important records. NBA bank has centralized client server database. This database record should be backup at different system which is only accessed when there is some problem in the original data. The backup system is initiated when the original database is destroyed.

How would you approach a friend that you suspect is addicted to technology?

Answers

Ask them to go out on a picnic or something that doesn’t involve technology and if they bring up excuses, tell them that it’s not healthy to be on their phones or other devices all the time.

You would approach a friend that you suspect is addicted to technology in numerous ways. Some of them are as follows:

Guide that individual towards tour and travel which can not include technology. Advise him to give tips on meditation and its benefits.Plan a regular schedule for exercise. Try to give the advantages of being familiar with family members.

What are the disadvantages of technology?

The disadvantages of technologies are as follows:

It stimulates social isolation and loneliness.Complete waste of time.It builds negative impacts on young students. Gradual degradation of mental health and memory.

According to the context of this question, technology addiction becomes normal in the present scenario. So, in order to prevent yourself and your family members from these traps follow some well-determined and strict routine and try to spend time with the family members, games that do not involve technology, meditation, exercise, etc.

Therefore, you would approach a friend that you suspect is addicted to technology in numerous ways. Some of them are well mentioned above.

To learn more about Technology addiction, refer to the link:

https://brainly.com/question/9552314

#SPJ5

The mainframe computer are the ____ and most ____ computers..​

Answers

Answer:

Mainframe computer are the larger system computers and most expensive computer.

How computer is important in our life​

Answers

Answer:

Computers are important in our lifes to keep us safe if theres a hurricane tornado or even a blizzard.

Another reason there important is so we can stay in contact with are family

and friends incase of an emergency.

Lastly there important because they can help us get to a place or destination

by using a gps.

Hope it helps✌✌

Answer:

computer is important because we can use it for playing games. watching videos listen music etcetera

can someone answer this? I'll mark u the brialintest!

Answers

pre convert single digits, or sometimes parts of a sum, then sum up. like this:

1.) 2³+2²+2^1+2^0 = 8+4+0+1 = 13

2.) 512 + 0 + 128 + 0 + 0 + 16 + 0 + 4 + 2 + 0 = 1010010110

you just need to know what the powers of two are, then you know how to convert numbers.

like 100 = 4 and 1 = 1 then 101 = 4 + 1 and in the other direction just take chunks of 5 until theres nothing left, but care not to overshoot the sum

5 = 2² + 0 + 2^1 = 101 in base2

the zeros are for the order, every time I would overshoot, it's a zero.

3.) 16 + 2 + 19 = 37

4.) 8² is 64, or (100)base8

8³ or 1000 would already overshoot, so let's see what we can do with the smaller value of a digit in base8, 8² = 64

we can 8 different digits (0 to 7) in base8

7x8^2 + 2*8^1 + 5*8^0

448 + 16 + 5

= (725)base8

very low battery right now. let me now if this already helps to grasp the concept. I'll come back later.

edit1: recharging my phone now. but I need to show quickly in order to get my own stuff done.

quick side note on topic: the number always stays the same, like if there would be a number of beans lying on the table. we justcrrorder them to write in another system. in normal base 10, 312 beans would be grouped intuitively in 3*100, 1*10 and 1*1

or: 3*10^2 + 1*10^1 + 2*10^0

note that something to the power of zero is always one (e.g.: 5^0 is like 5÷5)

Utility software as a service giving programs. Explain. Give me the answer please coming Sunday my homework will be check.​

Answers

Answer:

Explanation:

Utility software is software designed to help to analyze, configure, optimize or maintain a computer. It is used to support the computer infrastructure - in contrast to application software, which is aimed at directly performing tasks that benefit ordinary users.

Name of the best Android keyboard
Pls I need it asap!! For educational purpose
I need your Ideologies​

Answers

I think Gboard is good, you can switch between languages quickly and you can translate in real time. Translation is not perfect, but it is the best translation available. Vocabulary and autocorrect is not bad too. You can change the background. It has some themes of its own, but you can always customise it with your own photo. It has instant gif, stickers and emoji options too. It also has a good collection of symbolic emojis like: *\0/*O_o(๑♡⌓♡๑)ᕙ( • ‿ • )ᕗ(☉。☉)!I cannot include all of them, they are in 100s.

But if you are looking for a solution for grammatical mistakes, then you may want to consider Grammarly.

[tex]\boxed{\underline{\bf \: ANSWER}}[/tex]

Well, just like the person before me has answered ; I prefer Gboard, a keyboard provided by Go.ogle over all the other options ones available while using android. As you can see in the attached picture, I use Gboard & have been using it for quite a lot of years now as well. Gboard provides smooth surface for typing & there's glide technology as well. There's an option to pin your clipboard (which I find really helpful) & tons of built-in emojis, emoticons (this feature is not available in many), GIFs & so on. Also you can customize your keyboard by changing themes (you can either select one of the many backgrounds they have or choose one you like; in my case I have a blue scenery clipart as my background which matches my phone's overall theme). You can also use Gboard if you prefer to text in more than 1 language (this feature is available in many other keyboards as well though).

Now moving on, I would suggest the Samsung Keyboard too (that is, of you are using Samsung gadgets). The only reason I prefer Gboard over this keyboard is because you can't customize Samsung Keyboard (you can only choose White/Dark mode). Also, emoticons aren't available.

Then at last, there's the Grammarly Keyboard. This keyboard is really good if you are looking for writing essays, paragraphs or speeches as it catches all your grammar errors. But at times, it can be a bit too much & the keyboard is not overall smooth to use (at least for me).

So there, these 3 are the best keyboards for Android users.

_____

Hope it helps.

RainbowSalt2222

list out the memory components used by different generation of computer​

Answers

Answer:

here's your answer mate!

1940 – 1956: First Generation – Vacuum Tubes. These early computers used vacuum tubes as circuitry and magnetic drums for memory. ...

1956 – 1963: Second Generation – Transistors. ...

1964 – 1971: Third Generation – Integrated Circuits. ...

1972 – 2010: Fourth Generation – Microprocessors.

Explanation:

1940 – 1956: First Generation – Vacuum Tubes. These early computers used vacuum tubes as circuitry and magnetic drums for memory. ...

1956 – 1963: Second Generation – Transistors. ...

1964 – 1971: Third Generation – Integrated Circuits. ...

1972 – 2010: Fourth Generation – Microprocessors.

Data stored on physical storage devices must do what before the processor can access it? Be converted to binary Be written to the hard drive Go into short-term memory Go from volatile to nonvolatile memory

Answers

Answer:

Go into short-term memory

Explanation:

Data stored on physical storage devices must go into short-term memory before the processor can access it.

This is because, physical storage devices are secondary memory which store information for a long time. The CPU does not work directly with secondary memory but with primary or short term memory. Since the CPU works mainly with short term memory, information in physical storage or secondary memory has to go into short term memory for the CPU to be able to process it.

So, data stored on physical storage devices must go into short-term memory before the processor can access it.

You notice a growing number of devices, such as environmental control systems and wearable devices, are connecting to your network. These devices, known as smart devices, are sending and receiving data via wireless network connections.
Which of the following labels applies to this growing ecosystem of smart devices?
A. The smartnet
B. Internet of smart devices
C. *Internet of things*
D. Dynamic environment

Answers

Answer:

*Internet of things*

Explanation:

A network with multiple physical smart devices are known as things on the network

who is the father of computer



Answers

Answer:

Charles Babbage is the father of computer

Explanation:

Charles Babbage is know as father of computer.

hope this help!

An end-user license agreement protects _____.

Answers

End User License Agreements are important for protecting the rights of the business owner/licensor and critical for setting the rules of use and managing the expectations of the end-user.

Answer: both the owner and the purchaser of the software

Explanation:

Put these operating systems in order according to the date they were released. (The first to be released would be
number 1, and the last to be released would be number 5.)
1. 1
Windows 7
2. 2
Windows 2.0
3. 3
MS-DOS
4. 4
Windows XP
5. 5
Mac OS
NEXT QUESTION
ofron un

Answers

1. ms-dos 1981
2. windows 2.0 1987
3. windows xp 2001
4. mac os 2001
5. windows 7 2009

The place on the computer where information is stored temporarily so the processor can access it quickly is called what? Memory Kernel Mode Driver

Answers

Answer:

The answer is Memory

What is ADO.net????????​

Answers

Answer:

ADO.NET stands for ActiveX Data Object is a database access technology created by Microsoft as part of its .NET framework that can access any ...

Developer: Microsoft Corporation

Why is Charles Babbage is known as the father of computer?​

Answers

Answer:

Charles Babbage is known as the father of computer because he invented a machine called Analytical Engine, which is a model of today's computers.

have a great dayyyy

The marketing department has hired a new employee. Prior to the new employee's first day at work, you have set up and configured a new laptop computer. The computer and all of the peripherals were purchased from the same vendor. After the new employee begins work, you receive a phone call stating that the wireless mouse is not working.

Which of the following is the MOST likely reason the mouse isn't working?

A. The USB mouse driver is too old for the current mouse.
B. The USB mouse is not a wireless mouse and needs to be plugged into the computer.
C. The USB mouse is malfunctioning.
D. The USB mouse receiver is not plugged into the computer.

Answers

Answer:the usb mouse receiver is not plugged into the computer

Explanation:

In the case above, one can say that the USB mouse receiver is not plugged into the computer.

What is a USB mouse?

A USB mouse is known to be a tool that is often attaches to a computers USB port.

In the case above, one can say that the USB mouse receiver is not plugged into the computer and as such it cannot perform the task it need to do.

Learn more about USB mouse from

https://brainly.com/question/10847782

#SPJ9

Write the technical terms for each of the following:
a. The use of the Internet to buy and sell goods and services.
b. Voice communication through the Internet. C. A program that allows the user to log into a remote computer on the Internet as a user on that system.
d. High speed digital communication network evolving from existing telephony.
e. Software that is used for surfing information through the Internet.​

Answers

Explanation:

network" (and any subsequent words) was ignored because we limit queries to 32 words.

Similarities between in line css and internal css

Answers

Answer:

inline css is used to style a specific html element. for this css style, you'll only need to add the style attribute to each html tag, without using selectors. this css type is not really recommended, as each html tag needs to be styled individually. managing your website may become too hard if you only use inline css.

Explanation:

queens

After completing initial diagnostic procedures and allocating system resources, a startup BIOS program checks for information about secondary storage devices that might contain the OS. The list of devices and the order in which they should be checked can be found and arranged in the CMOS setup utility. This option is commonly referred to as a:

Answers

Answer:

Boor sequence

Explanation:

You want to protect data on hard drives for users with laptops. You want the drive to be encrypted, and you want to prevent the laptops from booting unless a special USB drive is inserted. In addition, the system should not boot if a change is detected in any of the boot files. What should you do

Answers

Answer:

Implement BitLocker with a TPM

Explanation:

In Computer science, a memory is a term used to describe the available space or an electronic device that is typically used for the storage of data or any computer related information such as images, videos, texts, music, codes and folders. Some examples of a storage device are hard disk drive, CD-ROM, flash drive, etc.

Basically, there are two (2) main types of memory;

A. Read only memory (ROM).

B. Random access memory (RAM).

In Cyber security, encryption is a form of cryptography and typically involves the process of converting or encoding informations in plaintext into a code, known as a ciphertext.

Typically, an information or data that has been encrypted can only be accessed and deciphered by an authorized user.

In this scenario, if you want to prevent the laptops from booting unless a special USB drive is inserted; you should implement BitLocker with a trusted platform module (TPM) on Microsoft Windows.

How do you send a file to someone in an email? (Choose all that apply). A. Select Send File and choose the file you need. B. Select the paperclip icon and choose the file you need. C. Open the file and then select Send in your email. D. Select Attach and choose the file you need.

Answers

Answer:

C. Open the file and then select Send in your email.

D. Select Attach and choose the file you need.

Explanation:

Communication can be defined as a process which typically involves the transfer of information from one person (sender) to another (recipient), through the use of semiotics, symbols and signs that are mutually understood by both parties.

One of the most widely used communication channel or medium around the world is an e-mail (electronic mail).

An e-mail is an acronym for electronic mail and it is a software application or program designed to let users send and receive texts and multimedia messages over the internet.

A file can be defined as a computer resource that avails end users the ability to store or record data as a single unit on a computer storage device.

The following documents or files such as soft copy attachments, web links and web pages may be sent from one user to another through the use of an email.

On a related note, some of the methods used for sending a file to someone in an email are;

I. Open the file and then select Send in your email.

II. Select Attach and choose the file you need.

write technical terms for the following statements.
A) A collection of programs which make computer work.
B) A language processor that converts assembly language codes in to machine language.
C)Software that is the basic requirement of a computer.
D) The software which help to maintain the hardware and software.
E) Applications software that is designed for an organization.
F)The software which does not provide right to modify.
G) The binary code obtained after the translation of source code.
H) The application which is needs internet to access and update. ​

Answers

Answer:

A) software

B)assembler

C)operating system

D)system software

E)data base

F)software license

G)machine code

H)ONLINE shopping apps

Considering what you know about dominant and recessive genes, what are the possible genotypes for brown eyed babies? What are the possible genotypes for blue eyed babies? Explain how you came to this response making sure to discuss dominant and recessive genes.

Answers

Answer:

B = Brown, b = blue

BB & BB = 100% Brown, 0% Blue

BB & Bb = 100% Brown, 0% Blue

Bb & Bb = 75% Brown, 25% Blue

Bb & bb = 50% Brown, 50% Blue

bb & bb = 0% Brown, 100% Blue

Explanation:

Reference the Punnett square. The brown gene when mixed with a blue gene  in one of the four squares is always dominant.

list any three positive impact of a computer​

Answers

Answer:

1.People are using computer to perform different tasks quickly. l takes less time to solve problems

2.People are using the computer for paying bills, online businesses and other purposes

3.It also uses in media .Media runs through the internet to passes information from one person to another person

Other Questions
If EF = 117 , FG = 100, EG = 94, IJ = 40 , and HJ = 37.6 , find the perimeter of HIJ. Round your answer to the nearest tenth if necessary. Figures are not necessarily drawn to scale. How was nick's character in the great gatsby? Chapter 1&2 Bob agreed to tutor Lola in Spanish for two (2) hours and Lola agreed to pay $25.00 per hour for the tutoring services. Bob tutored Lola and she paid Bob $50.00. This means that the parties have been _____. Jeffery wants to identify the subject terms being used in APA PsychInfo for articles related to behavior modifications. What is the most efficient and effective search strategy to identify subject terms for a database search in 201A. How did Germany react to the conditions of this clause? Explain. This year, Carlos planted 6 more than one-third of the cucumber plants he planted last year. How many cucumberplants did he plant this year if last year he planted 12 plants? 691012? PLEASE HELP SMB the following conversation, which discussion technique does Anna most clearly show ? RAMONA Anna, where does the theme seem to change? ANNA: According the article: "The fault lies with the FDA's inability to release enough information in order to regain the public's trust. But perhaps Japan is to blame as well. Although there are plans to remove the spent nuclear fuel rods and build a permafrost wall around the four damaged reactors, is this really enough to recover damaged trust?" And then Sato goes on to explain this statement . A. Asking clarifying questions B. Using evidence to support your conclusions C. Synthesizing claims into a single conclusion D. Challenging established ideas Mrs.Carlyle bought a bag of peanuts for her children. When Phillip, Joy, Brent, abd Preston came home from school, they each took some peanuts from the bag. did republicanism and liberalism affect the American revolution? and why give examples Spanish 20 points anyone here is a chance Determine whether the statement is true or false. If it is false, explain why or give an example that shows it is false. If a function is continuous at a point, then it is differentiable at that point. The following are all characteristics of projects EXCEPT: A. Projects are complex, involving a variety of skills and capabilities. B. Projects have a clear starting and ending point. C. Projects typically require significant levels of cross-functional and inter-organizational coordination. D. Projects are non-routine, making planning difficult. E. Projects are companies that launch a new, sustainable business model. One of the examples given by Agnew and Brezina as a way to reduce crime by reducing situational strains is to: What is the prime factorization of 30?O A. 2.2.3.5O B. 5.6O C. 3.10O D. 2.3.5 Quantity (Units) Private Value (Dollars) Private Cost (Dollars) External Cost (Dollars) 1 46 21 6 2 44 24 6 3 42 27 6 4 40 30 6 5 38 33 6 6 36 36 6 7 34 39 6The table represents a market in which: a. there is no externalityb. there is a positive externality. c. there is a negative externality. d. The answer cannot be determined from inspection of the table. Based on what you have read provide two positives and two negatives the Suarez family would face if they switch to organic farming write a paragraph about exam Five students are lined up in a row. Howmany arrangements could be made ifthe position of the last boy remainsunchanged?(WAEC) Kyle built a tree house 4 ft. by 6 ft. What was the area of the tree house? Register the countChars event handler to handle the keydown event for the textarea tag. Note: The function counts the number of characters in the textarea.Do not enter anything in the HTML file, put your code in the JavaScript section where it says "Your solution goes here"1 klabel for-"userName">user name: 2 3