Computers and Technology, 16.11.2020 21:30 kichensides
The template code provided is intended to check whether an integer entered by the user is outside of the range 20-29 (inclusive). If it is outside of this range the program should print a warning and change the number to 25. However, when using De Morgan's law to simplify this code, the programmer has made some mistakes. Can you correct the errors so the code functions as intended?
code:
Scanner scan = new Scanner(System. in);
System. out. println("Enter a number in the twenties");
int num = scan. nextInt();
if(num 30){
System. out. println("That's not in the twenties!");
num = 25;
}
System. out. println("Your number is " + num);
sample run: Enter a number in the twenties
28
Your number is 28
Answers: 3
Computers and Technology, 21.06.2019 17:00, carriecarl3530
Ineed a good science fair name i’m doing a homemade water filter and i have no idea what the title should be plz
Answers: 1
Computers and Technology, 24.06.2019 00:30, Auttyrain3929
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
Computers and Technology, 24.06.2019 14:00, Abrahamolve
When creating a field in a table, you must set the to determine what type of data the field can store. field property data type field type data property
Answers: 1
The template code provided is intended to check whether an integer entered by the user is outside of...
Mathematics, 17.02.2020 19:09
Mathematics, 17.02.2020 19:09