[백준/Java] 1008 : A / B

SEOP·2023년 4월 23일
0

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double a;
        double b;

        a = scanner.nextInt();
        b = scanner.nextInt();
        System.out.println(a/b);
    }
}

OR

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        double a = Double.parseDouble(str[0]);
        double b = Double.parseDouble(str[1]);

        System.out.println(a/b);
    }
}
profile
응애 나 애기 개발자

0개의 댓글