Question
Q: Write a program using integers userNum and divNum as input, and output userNum divided by divNum three times. Note: End with a newline. Ex:
Q: Write a program using integers userNum and divNum as input, and output userNum divided by divNum three times. Note: End with a newline.
Ex: If the input is: 2000 2 and the output is 1000 500 250
Note: In Java, integer division discards fractions. Ex: 6/4 is 1 (the 0.5 is discarded).
Java Submission :
import java.util.Scanner; public class LabProgram { public static void main(String[] args) { Scanner s = new Scanner(System.in); int userNum = s.nextInt(); int divNum = s.nextInt(); int i = 0; while(i
Error - Output is nearly correct, but whitespace differs. See highlights below.
I am going in circles trying to figure out the whitespace they are referring to. Thank you in advance for your assistance.
Your output Expected outputStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started