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, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
Computers and Technology, 24.06.2019 12:10
What is it called during the editing process when the processor ensures that a character holding a coffee mug from one angle is holding the same mug in the same way when the shot switches to another camera at another angle? cinematography continuity technology prop use
Answers: 1
Computers and Technology, 24.06.2019 22:30
When can you access the bios setup utility?
Answers: 1
Computers and Technology, 25.06.2019 05:10
Write a program that asks for 'name' from the user and then asks for a number and stores the two in a dictionary (called 'the_dict') as key-value pair. the program then asks if the user wants to enter more data (more data (y/n)? ) and depending on user choice, either asks for another name-number pair or exits and stores the dictionary key, values in a list of tuples and prints the list. note: ignore the case where the name is already in the dictionary. example: name: pranshu number: 517-244-2426 more data (y/n)? y name: rich number: 517-842-5425 more data (y/n)? y name: alireza number: 517-432-5224 more data (y/n)? n [('alireza', '517-432-5224'), ('pranshu', '517-244-2426'), ('rich', '517-842-5425')]
Answers: 3
The template code provided is intended to check whether an integer entered by the user is outside of...
Mathematics, 10.09.2020 01:01
Mathematics, 10.09.2020 01:01
Health, 10.09.2020 01:01
Mathematics, 10.09.2020 01:01
Mathematics, 10.09.2020 01:01
Mathematics, 10.09.2020 01:01
History, 10.09.2020 01:01
Mathematics, 10.09.2020 01:01
Physics, 10.09.2020 01:01
English, 10.09.2020 01:01
Mathematics, 10.09.2020 01:01
Social Studies, 10.09.2020 01:01
English, 10.09.2020 01:01
Mathematics, 10.09.2020 01:01
German, 10.09.2020 01:01
Mathematics, 10.09.2020 01:01
Mathematics, 10.09.2020 01:01
History, 10.09.2020 01:01
Social Studies, 10.09.2020 01:01
Biology, 10.09.2020 01:01