Answer:
kbfbnmcj hbx nmjn mz kjn mj hk hhhhhhgdhggbddddddbvgfcgfctrctgvhyubujbnjinkikmokimloplkmkojihgftrdesw3l,kmjinhuygtfrde4sw34drftyghuijokkkkkkkkkkkkkkkijjjjjjjkopl[[[[[koiju98hytttttttttttttuhiouhygdtrsgyuihkl;;ihugydtrcfbhjklioutrcgfbhjkloiuytdrhjukliuytrdgfhjkiouy7gfhjklpoiudtrkhjl;[poiughjbnm,;lkihuygtfvbnmjkiuytfgchvbnmkjlhuygfdc vbnhnjkygtdsfxghbjkiuhytrdgfhjuioytrdfgchbnmkloiuytfdfghjiouyyyyyyhjkpoi8u97t6rdghjuo0987hjklpo0i98uyghjbkopiuyhjbnkploiuhyjbnmkloiuhygbvjnmk,l;oipuhgbjkn mjhuygfvbnhjkiouuuukjopipkjmloiujoklm;okjm,kloiuhjnmkiuhjbkiuygfhuji8yghyugfvhjkjiuhygfhuijokpiuyt67u89poiuhygftduhjklphuytfrdesdtgyuhi;lkyuuuugij'[;;;;;;;;;;;;;;;;;;;;okpuuuutyyyyy[poiudtryuiop[;oiudtrruiooooooooytg[pl;oiuhygtfffkjjjjhugvcfxkml,;kjnhbgvchbjnk,lijuhygfcbvh nmmpoiugyhjb,m ./[poiuhbjnm,k;lijuytfrcgbvhkjlipouuuujipouuuukliouygkjliubhjkml
Explanation:
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.
The long term memory used by the computer is called “RAM”