분류 전체보기

import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); for(int i=1; i
N을 입력받은 뒤, 구구단 N단을 출력하는 프로그램을 작성하시오. 출력 형식에 맞춰서 출력하면 된다. 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)); int num = Integer.parseInt(br.readLine()); for(int i=1; i
public class Kata { public static String switchItUp(int number) { String[] arr = {"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"}; String arr1 = arr[number]; return arr1; } }
public class TwiceAsOld{ public static int TwiceAsOld(int dadYears, int sonYears){ //TODO: Add code here int years = dadYears - 2 * sonYears; if (years > 0) { return years; } return years * (-1); } }
public class Kata{ public static double find_average(int[] array){ double avr = 0; for(int i = 0; i < array.length; i++){ avr += array[i]; } double result = avr / array.length; return result; } }
public class SumArray { public static double sum(double[] numbers) { double res = 0; for(int i = 0; i < numbers.length; i++) res += numbers[i]; return res; } }
public class Kata { public static int rentalCarCost(int d) { if(d > 0){ if(d > 0 && d =3 && d = 7) return (d * 40) - 50; } return d; } }
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int year = Integer.parseInt(br.readLine()); System.out.print((year % 4==0)?((year % 400==0)?"1":(year % 100==0)?"0":"1"):"0"); } }
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)); int x = Integer.parseInt(br.readLine()); int y = Integer.parseInt(br.readLine()); if(x > 0) { if(y > 0) { System.out.print(1); } else { System.out.prin..
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(); int score = Integer.parseInt(str); System.out.println((score >= 90)?"A" : (score >= 80)?"B" : (score >= 70)?"C" : (score >= ..
ssoyul
'분류 전체보기' 카테고리의 글 목록 (4 Page)