fork download
  1. import java.util.Scanner;
  2.  
  3. public class OhmTong {
  4. public static void main(String[] args) {
  5. Scanner input = new Scanner(System.in);
  6.  
  7. Scanner input = new Scanner(System.in);
  8. System.out.println("Enter a decimal number:");
  9. double number = input.nextDouble();
  10. System.out.println("You entered: " + number);
  11.  
  12. }
  13. }
  14.  
Success #stdin #stdout 0.03s 25956KB
stdin
4
5
5
5
5
5

5
stdout
import java.util.Scanner;

public class OhmTong {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

Scanner input = new Scanner(System.in);
System.out.println("Enter a decimal number:");
double number = input.nextDouble();
System.out.println("You entered: " + number);

    }
}