What am I doing wrong why is it not going through ? What the errors in my code

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
icon
Related questions
Question
100%
What am I doing wrong why is it not going through ? What the errors in my code ?
dit View History Bookmarks Window Help
zy Sectio...
HW_5-...
40
Edit View Tools Help
C Chegg.
C
28
docs.google.com
Ch...
Lehman College, City University of New York
1. If num is odd,
2. If num is even,
3. If num is divisible by 2;
4. If num is divisible by 5,
5. If num is divisible by 8,
6. If num is divisible by 11,
Please note that your class should be named FirstLoop.
C In java...
output: num is an odd number
output: num is an even number
output: num is divisible by 2
output: num is divisible by 5
output: num is divisible by 8
output: num is divisible by 11
Writable
C In java...
Homework 5-1
Write a program with a loop that iterates as long as an int variable called num is less or equal to 50.
Num must be initialized with a value of 1 and incremented by 1 with each iteration.
Each iteration of the loop must print all appropriate sentences for that number according to the following:
I
C
b Answ....
Request edit access
Smart Insert
3:17:36
(A)
tv
Online...
Transcribed Image Text:dit View History Bookmarks Window Help zy Sectio... HW_5-... 40 Edit View Tools Help C Chegg. C 28 docs.google.com Ch... Lehman College, City University of New York 1. If num is odd, 2. If num is even, 3. If num is divisible by 2; 4. If num is divisible by 5, 5. If num is divisible by 8, 6. If num is divisible by 11, Please note that your class should be named FirstLoop. C In java... output: num is an odd number output: num is an even number output: num is divisible by 2 output: num is divisible by 5 output: num is divisible by 8 output: num is divisible by 11 Writable C In java... Homework 5-1 Write a program with a loop that iterates as long as an int variable called num is less or equal to 50. Num must be initialized with a value of 1 and incremented by 1 with each iteration. Each iteration of the loop must print all appropriate sentences for that number according to the following: I C b Answ.... Request edit access Smart Insert 3:17:36 (A) tv Online...
Navigate Search Project Run Window Help
ote that your
MAR
28
•●●
Package Explorer X
FirstLoop
✓src
> firstLoop
>
E
JRE System Library [JavaSE-17]
module-info.java
Cº
Grades.java
> module-info.java
000
E
Grades
JRE System Library [JavaSE-17]
src
Grades
▶ R
Writable
@
F
20
18
19
*FirstLoop.java X
public class firstloon:
eclipse - FirstLoop/src/firstLoop/FirstLoop.java - Eclipse IDE
}
FONT
public static void main(String[] args) {
int num= 1;
I
while (num <= 50) {
}
Grades.java
if (num % 2 == 1) {
System.out.println(num+" is an odd number");
} else {
System.out.println(num+" is an even number");
System.out.println(num+" is divisible by 2");
}
if (num% 5 == 0) {
System.out.println(num+" is divisible by 5");
}
if (num % 8 == 0) {
System.out.println(num+" is divisible by 8");
}
if (num % 11 == 0) {
System.out.println(num+" is divisible by 11");
}
System.out.println();
num++;
Smart Insert
Problems Javadoc Declaration Console X
Grades (1) [Java Application]
Enter a grade:
O $ 32
ON
1:1:0
8
#tv A
.
☎
Q
A
eclipse
O
OXX BNPFLECO
/Users/juniortrujillo/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.x86_64_17.0.6.v20230204-1729
Tue Mar 28 9:55 PM
Outline X
CfirstLoop
CO
main(String[]): void
Transcribed Image Text:Navigate Search Project Run Window Help ote that your MAR 28 •●● Package Explorer X FirstLoop ✓src > firstLoop > E JRE System Library [JavaSE-17] module-info.java Cº Grades.java > module-info.java 000 E Grades JRE System Library [JavaSE-17] src Grades ▶ R Writable @ F 20 18 19 *FirstLoop.java X public class firstloon: eclipse - FirstLoop/src/firstLoop/FirstLoop.java - Eclipse IDE } FONT public static void main(String[] args) { int num= 1; I while (num <= 50) { } Grades.java if (num % 2 == 1) { System.out.println(num+" is an odd number"); } else { System.out.println(num+" is an even number"); System.out.println(num+" is divisible by 2"); } if (num% 5 == 0) { System.out.println(num+" is divisible by 5"); } if (num % 8 == 0) { System.out.println(num+" is divisible by 8"); } if (num % 11 == 0) { System.out.println(num+" is divisible by 11"); } System.out.println(); num++; Smart Insert Problems Javadoc Declaration Console X Grades (1) [Java Application] Enter a grade: O $ 32 ON 1:1:0 8 #tv A . ☎ Q A eclipse O OXX BNPFLECO /Users/juniortrujillo/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.x86_64_17.0.6.v20230204-1729 Tue Mar 28 9:55 PM Outline X CfirstLoop CO main(String[]): void
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Processes of 3D Graphics
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education