Double variable numSeconds is read from input. Type cast numSeconds to an integer. Ex: If the input
Fantastic news! We've Found the answer you've been seeking!
Question:
Double variable numSeconds is read from input. Type cast numSeconds to an integer.
Ex: If the input is 11.5,
then the output is: 11
public class IntegerNumberConverter { public static void main(String args[]) { Scanner scnr = new Scanner(System.in);
double numSeconds; numSeconds = scnr.nextDouble();
System.out.println(/* Your code goes here */); } }
Related Book For
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss
Posted Date: