Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
100%

Can you help debug my program? It's in Java.

Attached: my code screenshot.

Problems: 

1) next cannot be resolved or is not a field (lines 16, 19, 22)
2) Scanner cannot be resolved to a variable
3) Syntax error at ), delete this token (line 29)

 

package bounds;
import java.util.Scanner;
public class bounds {
public static void main(String[] args) {
try {
int startingNumber, upperBound, stepSize;
Scanner = new Scanner(System.in);
//I made the user questions more friendly
System.out.print("Give me a starting number?");
startingNumber
= Scanner.next.Int();
System.out.print ("Give me the upper limit?");
upperBound
= Scanner.next.Int();
System.out.print("Give me the step size?");
stepSize
= Scanner.next.Int();
System.out.println("starting number:
+ startingNumber + "upper limit:
+ stepSize);
п
+ upperBound + "step size:
%3D
int calc
for
= 0;
(int i = 0, j = 1; startingNumber + i * stepSize) < upperBound; i++, j±±;
{
int i = 0, j = 1;
calc = startingNumber + i * stepSize;
if (j < 10 || (j % 10) !=0) System.out.print(calc +
else
");
%3D
System.out.println(calc);
} catch (Exception e) {
}}
expand button
Transcribed Image Text:package bounds; import java.util.Scanner; public class bounds { public static void main(String[] args) { try { int startingNumber, upperBound, stepSize; Scanner = new Scanner(System.in); //I made the user questions more friendly System.out.print("Give me a starting number?"); startingNumber = Scanner.next.Int(); System.out.print ("Give me the upper limit?"); upperBound = Scanner.next.Int(); System.out.print("Give me the step size?"); stepSize = Scanner.next.Int(); System.out.println("starting number: + startingNumber + "upper limit: + stepSize); п + upperBound + "step size: %3D int calc for = 0; (int i = 0, j = 1; startingNumber + i * stepSize) < upperBound; i++, j±±; { int i = 0, j = 1; calc = startingNumber + i * stepSize; if (j < 10 || (j % 10) !=0) System.out.print(calc + else "); %3D System.out.println(calc); } catch (Exception e) { }}
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
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
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education