Question: (4) Cast the double to an integer and do the same operation as integer division (1 pts) Interleaved: Enter a double: 0.5 Enter an integer:

(4) Cast the double to an integer and do the same operation as integer division (1 pts) Interleaved: Enter a double: 0.5 Enter an integer: 2 Enter a character: z Enter a string: Howdy 2 0.5 z Howdy zHowdyz 0.5/2=0.25 0/2=0 Before turning in, remember to Style and Comment following the course standards CS 200 Style. Assignment by T.J. Wilder. Reviewed By Suleman Ahmad LAB ACTIVITY 2.15.1: Ch 2 Program, part 1: Variables, input, and casting (Java) 0/6 Load default template... BasicInput.java public class BasicInput { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); double user Double = 0.0; int user Int = 0; // FIXME Define char and string variables similarly System.out.print("Enter an double: "); userDouble = scnr.nextDouble(); // FIXME (1): Finish reading other items into variables, then output the four values on a single line separated by a sp // FIXME (2): Output a line where the character is added on both sides of the String // FIXME (3): Divide the double by the integer // FIXME (4): Cast the double to an integer and do the same operation as integer division return
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
