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
A(n) _______ gate provides an output of 1 if either or both inputs are 1.
Furkat [3]

Answer:

the last one maybe sorry if its incorrect

6 0
3 years ago
Read 2 more answers
You are in the windows power shell window and decide to encrypt folder which of the following command do you use
aleksklad [387]

Answer:

try this script bro

(Get-ChildItem –Path C:\Folder).Encrypt()

Explanation:

simply microsoft just use encrypt() & decrypt() words in script to act doing the method encrypting & decrypting.

but i suggest you to use the windows gui features , its more easier. just right click on your folder target , go to properties then click advanced button , checklist encrypt box.

7 0
3 years ago
Question # 6
insens350 [35]

Answer:

April 30, 1993

Explanation:

On April 30, 1993, four years after publishing a proposal for “an idea of linked information systems,” computer scientist Tim Berners-Lee released the source code for the world’s first web browser and editor.

4 0
3 years ago
Which keyboard feature is a form feed character?
Sever21 [200]

Answer:

B

Explanation:

The form feed character code is defined as 12 (0xC inbhexademical), and may be represented as control+L or^L. In a related use, control+L can be used to clear the screen in Unix shells such as bash. In the C programming language ( and other languages derived from C ), the form feed character is represented as '\f'.

5 0
3 years ago
What is the difference between hardware and software?
alina1380 [7]
A Hardware is any physical device used in. You can touch hardware, but you cannot touch software. Hardware is physical, and software is virtual. (brainliest) ??
4 0
3 years ago
Other questions:
  • A ____ is text and graphics that print at the bottom of every page.
    12·1 answer
  • What is the height of the tallest possible red-black tree containing 31 values?
    7·1 answer
  • A self-confident person knows that:
    13·1 answer
  • What type of interview would be most likely for the following scenario?
    11·2 answers
  • Worth 30 pts
    9·2 answers
  • Technician A says that as volume decreases, pressure increases. Technician B says that as temperature increases, pressure decrea
    15·2 answers
  • Public class Square extends Shape{
    13·1 answer
  • Write a program in C/C++ to draw the following points: (0.0,0.0), (20.0,0.0), (20.0,20.0), (0.0,20.0) and (10.0,25.0). For this
    6·1 answer
  • . In this project, how many times will the [Drive] block be repeated?
    15·1 answer
  • 1. The letters that appear after the dot after a file name are called the:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!