No sweet without sweat

[프로그래머스] - 두 수의 나눗셈 본문

프로그래머스

[프로그래머스] - 두 수의 나눗셈

Remi 2023. 1. 24. 22:10
728x90
반응형

public class Solution {
    public int solution(int num1, int num2) {
        int answer2 = 0;
        double answer = answer2;
        answer = (double)num1/(double)num2 * 1000;
        System.out.println((int)answer);
        return (int) answer;
    }

    public static void main(String[] args) {
        Solution solution = new Solution();
        solution.solution(3, 2);
    }

}
728x90
반응형
Comments