Answered step by step
Verified Expert Solution
Question
1 Approved Answer
correct code: Enter the total inches as an integer: 6 inches is 0.50 feet. My code: Enter the total inches as an integer: inches is
correct code: Enter the total inches as an integer: 6 inches is 0.50 feet.
My code: | Enter the total inches as an integer: inches is 0.50 |
2. Total Inches to Real Value Feet saved Pyin www . www . .www www. www. Please use printf to print exactly two digits after the decimal point for the real value. The following is a sample run: Enter the total inches as an integer: 18 inches is 1.50 feet. 118 Full Screen 5 InchesToFeet.Java New 1- import java.util.*; 2 public class Inches ToFeet 3 - { 4 public static void main(String[] args) 5- /*make Scanner Object for scan value from user*/ 7 Scanner scanner =new Scanner(System.in); System.out.print("Enter the total inches as an integer:"); int inches = scanner.nextInt(); { System.out.printf(" inches is "+String.format("%.2f", inches/12.0))
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