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
Harlamova29_29 [7]
3 years ago
15

PLEASE HELP ASAP (answer is needed in Java) 70 POINTS

Computers and Technology
1 answer:
8_murik_8 [283]3 years ago
6 0

import java.util.Scanner;

public class MyClass1 {

   public static void main(String args[]) {

     Scanner scan = new Scanner(System.in);

     int smallest = 0, largest = 0, num, count = 0;

     while (true){

         System.out.println("Enter a number (-1 to quit): ");

         num = scan.nextInt();

         if (num == -1){

             System.exit(0);

         }

         else if (num < 0){

             System.out.println("Please enter a positive number!");

         }

         else{

             if (num > largest){

                 largest = num;

                 

             }

             if (num < smallest || count == 0){

                 smallest = num;

                 count++;

             }

             System.out.println("Smallest # so far: "+smallest);

             System.out.println("Largest # so far: "+largest);

         }

     }

   }

}

I hope this helps! If you have any other questions, I'll do my best to answer them.

You might be interested in
Choose all of the items that represent functions of the operating system kernel.
babunello [35]

Answer: its all of them

Explanation: I took Assignment over this

6 0
3 years ago
Read 2 more answers
Assume the variable sales references a float value. Write a statement that displays the value rounded to two decimal points.Assu
romanna [79]

Answer:

The statement is as follows:

print("{0:,.1f}".format(number))

Explanation:

Required

Statement to print 1234567.456 as 1,234,567.5

To do this, we make use of the format keyword, and we set the print format in the process.

To round up number to 1 decimal place, we use the following format:

"{0:,.1f}"

To include comma in the thousand place, we simply include a comma sign before the number of decimal place of the output; i.e. before 1

"{0:,.1f}"

So, the print statement is:

print("{0:,.1f}".format(number))

3 0
3 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
In a presentation, bullets in a text box will do which of the following?
lbvjy [14]
I'm almost certain that it is A. "Help you present your data with concise statements". Hope this helped :) Xx
8 0
3 years ago
Jim maintains attendance records for his employees for the year. Row B includes the dates of attendance, and column A includes t
EastWind [94]
To lock multiple rows (starting with row 1), select the row below the last row you want frozen, choose the View tab, and then click Freeze Panes. To lock multiple columns, select the column to the right of the last column you want frozen, choose the View tab, and then click Freeze Panes<span>.
</span>
4 0
4 years ago
Read 2 more answers
Other questions:
  • Nina is explaining the SQA process to her friend Amanda.
    9·1 answer
  • HELP PLZ ;(
    10·2 answers
  • What type of power flaw involves a fluctuation in voltage levels caused by other devices on the network or by EMI?
    13·1 answer
  • Some touch screens recognize when you touch the screen with two fingers or two hands. If you are looking for a device on which y
    11·1 answer
  • The following code processes a file containing five positive numbers. What will the variable $result contain after the code is e
    13·1 answer
  • Intellectual property piracy has gotten a small boost from the increasing availability of counterfeit goods through Internet cha
    14·1 answer
  • What of the following is not a benefit of active listening
    8·2 answers
  • You have one IP address provided from your ISP with a /30 mask. However, you have 300 users that need to access the Internet. Wh
    10·1 answer
  • Drag the tiles to the correct boxes to complete the pairs.
    15·2 answers
  • 3. Output the following:<br>a.<br>21%4​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!