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.
Answer:
several personnel accessing the registration system
Explanation:
batch processing is all about multiprogramming so I think the first answer is the best as it is not based on one person .I know the last answer might be almost close but on a closer look it is not the answer as it is single based as written a file
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The CPU is responsible for processing instruction. CPU instruction processing goes through three stages. Fetch, Decode, and Execute.
When the program runs, program code is copied from secondary storage into main memory. CPU's program counter set to the first instruction of the program stored in memory where the program starts executing.
When a program is being executed, it goes through fetch-decode-cycle. which repeats over and over again until reaching the STOP instruction.
The processor check which next instruction to be executed, then the processor fetches that instruction value from the memory location. once the instruction being fetched it gets decoded and executed. This instruction processing cycle repeating until the CPU finds a stop instruction.
The elements in a string type array will be initialized to "Null".
Answer:
I say when u don't know the answer completly.