Ex: If the input is: 2000 2 the output is: 1000 500 250 Note: In Java, integer division discards fractions. Ex: 6/ 4 is 1 (the 0.5 is discarded).

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 14RQ
icon
Related questions
Question
Ex: If the input is:
2000 2
the output is:
1000 500 250
Note: In Java, integer division discards fractions. Ex: 6/ 4 is 1 (the 0.5 is discarded).
Transcribed Image Text:Ex: If the input is: 2000 2 the output is: 1000 500 250 Note: In Java, integer division discards fractions. Ex: 6/ 4 is 1 (the 0.5 is discarded).
LabProgram.java
Load default template...
1 import java.util.Scanner;
2
3 public class LabProgram {
public static void main(String[] args) {
/* Type your code here. */
}
7 }
4
5
6
8
Transcribed Image Text:LabProgram.java Load default template... 1 import java.util.Scanner; 2 3 public class LabProgram { public static void main(String[] args) { /* Type your code here. */ } 7 } 4 5 6 8
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Files and Directory
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT