3) Find the errors in the following code segments: a) for (int i= 100, i >= 1; i++) System.out.println(i) b) The following code should print whether "value" is odd or even. switch (values % 2) ( case 0: case 1: System.out.println("This is an") System.out.println("even");: System.out.println("number.") System.out.println("This is an") System.out.println("odd"); System.out.println("number.") c) The following code should print the odd integers from 19 to 1. for (int i = 19, i >= 1; i+= 2)
3) Find the errors in the following code segments: a) for (int i= 100, i >= 1; i++) System.out.println(i) b) The following code should print whether "value" is odd or even. switch (values % 2) ( case 0: case 1: System.out.println("This is an") System.out.println("even");: System.out.println("number.") System.out.println("This is an") System.out.println("odd"); System.out.println("number.") c) The following code should print the odd integers from 19 to 1. for (int i = 19, i >= 1; i+= 2)
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please help me with using java
![Freedom
X Selection and Repetition Home...
3) Find the errors in the following code segments:
a) for (int i= 100, i >= 1; i++)
4)
System.out.println(i)
}
b) The following code should print whether "value" is odd or even.
switch (values % 2)
(
case 0:
case 1:
2:25 PM
System.out.println("This is an")
System.out.println("even");
System.out.println("number.")
c) The following code should print the odd integers from 19 to 1.
for (int i 19, i >= 1; i = 2)
System.out.println("This is an")
System.out.println("odd");
System.out.println("number.")
public static void main(String args[]) throws IOException
1
int highest, lowest;
int product = 1;
1
BufferedReader kb = new BufferedReader (new InputStreamReader(System.in));
System.out.println("Enter the lowest integer: ");
lowest Integer.parseInt( kb.readLine())
} // main method
System.out.println("Enter the highest integer: ");
highest Integer.parseInt( kb.readLine())
for (int count highest; count>> lowest ; count-)
product product count;
System.out.println("The product is: " + product);
a) Describe the purpose of the above program. Can it be used for a common math
operation? What is it?
@ 32%
b) Write its output if the user enters 10 as the "highest" and 1 as the "lowest".
000](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb1376c19-02cc-4fad-8ef6-91f43cd7b4de%2F9b3dce99-b9b3-45cb-997d-74c6169e688f%2F81y0g5g_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Freedom
X Selection and Repetition Home...
3) Find the errors in the following code segments:
a) for (int i= 100, i >= 1; i++)
4)
System.out.println(i)
}
b) The following code should print whether "value" is odd or even.
switch (values % 2)
(
case 0:
case 1:
2:25 PM
System.out.println("This is an")
System.out.println("even");
System.out.println("number.")
c) The following code should print the odd integers from 19 to 1.
for (int i 19, i >= 1; i = 2)
System.out.println("This is an")
System.out.println("odd");
System.out.println("number.")
public static void main(String args[]) throws IOException
1
int highest, lowest;
int product = 1;
1
BufferedReader kb = new BufferedReader (new InputStreamReader(System.in));
System.out.println("Enter the lowest integer: ");
lowest Integer.parseInt( kb.readLine())
} // main method
System.out.println("Enter the highest integer: ");
highest Integer.parseInt( kb.readLine())
for (int count highest; count>> lowest ; count-)
product product count;
System.out.println("The product is: " + product);
a) Describe the purpose of the above program. Can it be used for a common math
operation? What is it?
@ 32%
b) Write its output if the user enters 10 as the "highest" and 1 as the "lowest".
000
Expert Solution

Step 1 Introduction
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is used to create the web applications and also the program or the code which is created can be used by the another program or the code. It is case senstive.
Step by step
Solved in 3 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education