Answered step by step
Verified Expert Solution
Question
1 Approved Answer
what did I do wrong? 2.20 LAB: Divide input integers Write a program using integers userNum and divNum as input, and output userNum divided by
what did I do wrong?
2.20 LAB: Divide input integers 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: 20002 the output is: 1000500250 Note in Java, integer division discards fractions. Ex 6/4 is 1 (the 0.5 is discarded). 2.201.1 AB: Divide input integers import java. utzL.scanner; public class LabProgram \{ public static void main(String[ args) \{ int numNominator; int numDenominator; int numsum; numNominator =2000; numbenominator =2; numSum = numNominatorumbenominator; System.out.print(numSum); numSum = numSum/ numdenominator; System, out.print(" "); System.out.print(numSum); numsum = numSumumbenominator; System,out.print(" "); Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. Enter program input (optional) Enter program input (optional) 20002 Run program Input(fromabove)LabProgram.java(Yourgcogran)Output(shownbelow) Program output displayed here 1000500250 Step 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