Output the numbers 1-100, but make all numbers that are multiple of five Negative. Output a new line after each number. Write a code in Java that results like test case 1.

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
Output the numbers 1-100, but make all numbers that are multiple of five Negative. Output a new line after each number. Write a code in Java that results like test case 1.
Test Case 1
1\n
2 \n
3 \n
-5 \n
6 \n
8 \n
-10 \n
11 \n
12 \n
13 \n
14 \n
-15m
16 \n
17 \n
18 \n
19 \n
Transcribed Image Text:Test Case 1 1\n 2 \n 3 \n -5 \n 6 \n 8 \n -10 \n 11 \n 12 \n 13 \n 14 \n -15m 16 \n 17 \n 18 \n 19 \n
977 \n
978 \n
979 \n
-980 \n
981 n
982 \n
983 \n
984 \n
-985 \n
986 \n
987 \n
988 in
989 \n
-990 \n
991 \n
992 \n
993 \n
994 \n
-995 \n
996 \n
997 \n
998 \n
999 \n
-1000 \n
Transcribed Image Text:977 \n 978 \n 979 \n -980 \n 981 n 982 \n 983 \n 984 \n -985 \n 986 \n 987 \n 988 in 989 \n -990 \n 991 \n 992 \n 993 \n 994 \n -995 \n 996 \n 997 \n 998 \n 999 \n -1000 \n
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
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