Home /
Expert Answers /
Computer Science /
given-the-double-variable-numseconds-type-cast-numseconds-to-an-integer-and-assign-the-value-to-t-pa451
(Solved):
Given the double variable numSeconds, type cast numSeconds to an integer and assign the value to t ...
Given the double variable numSeconds, type cast numSeconds to an integer and assign the value to the variable newSeconds. Ex: If the input is \( 99.48 \), then the output is: 99 1 import java. util.scanner; 3 public class IntegerNumberConverter \{ public static void main(String args []) \{ Scanner scnr = new Scanner(System.in); double numbeconds; int newSeconds; numSeconds \( = \) scnr. nextDouble(); \( / * \) Enter your code here*/ System.out.println(newSeconds); \} 3
Thanks for the question. Below is the code you will be needing. Let me know if you have any doubts or if you need anything to change. If you are satisfied with