Home /
Expert Answers /
Computer Science /
in-java-question-translate-the-following-algorithm-into-java-code-step-1-declare-a-double-variabl-pa148
(Solved): in java Question: Translate the following algorithm into Java code: Step 1: Declare a double variabl ...
in java
Question: Translate the following algorithm into Java code: Step 1: Declare a double variable named miles with initial value 100 . Step 2: Declare a double constant named KILOMETERS PER MILE with valu \( 1.5 \). Step 3: Declare a double variable named kilometers, multiply miles and KILOMETERS PER MILE, and assign the result to kilometers. Step 4: Display kilometers to the console. What is the kilometers nfter Step 4?