002-003-003

Data Types: Integer and Double Input

Easy

Problem Description

Different Data Type Input

Use nextInt() for integers and nextDouble() for decimal numbers.

.

Test Cases

※ Output examples follow programming industry standards

Input:
42
3.14
Expected Output:
Integer: 42
Double: 3.14
Input:
100
2.5
Expected Output:
Integer: 100
Double: 2.5
Input:
0
0.0
Expected Output:
Integer: 0
Double: 0.0
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here

sc.close();
}
}
0 B / 5 MB

You have 6 free executions remaining