Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in this program, the only way it will work if the equaiton is spaced out. TO recieve extra credit. i need to alter the program
in this program, the only way it will work if the equaiton is spaced out. TO recieve extra credit. i need to alter the program to where it doesnt have to have spaces in the users equation
Scanner kbd - new Scanner (System.in); System.out.println( "Equation: ");//declaring three seperate variables int firstInt-kbd.nextInt(); String secondPlace-kbd.next); int secondInt-kbd.nextInt(); DecimalFormat numberFormat - new DecimalFormat ("#.ee"); if (secondInt!-e)(//starting off by seeing if user is try to divide by zero switch (secondPlace)//else start calculatons case "+" System.out.print (firstInt + " + " + secondInt-. ");//equation for additon System.out.println(firstInt+secondInt); breakStep 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