This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
//Object : N찍기 | |
//question : 자연수 N이 주어졌을 때, 1부터 N까지 한 줄에 하나씩 출력하는 프로그램을 작성하시오. | |
//Name : Hyeon Soo Lee | |
//Email : 99leehs@naver.com | |
public class ex09 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int f = sc.nextInt(); | |
for (int i = 1; i <= f; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
// Object : 기찍N | |
// Question : 자연수 N이 주어졌을 때, N부터 1까지 한 줄에 하나씩 출력하는 프로그램을 작성하시오. | |
// Name : Hyeon Soo Lee | |
// Email : 99leehs@gmail.com | |
public class ex10 { | |
public static void main(String[] args) { | |
Scanner sc= new Scanner(System.in); | |
int j = sc.nextInt(); | |
for (int i = j; i >0 ; i--) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
// Object : 구구단 | |
// Question : N을 입력받은 뒤, 구구단 N단을 출력하는 프로그램을 작성하시오. 출력 형식에 맞춰서 출력하면 된다. | |
// Name : Hyeon Soo Lee | |
// Email : 99leehs@gmail.com | |
public class ex11 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int j = sc.nextInt(); | |
for (int i = 1; i <= 9; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
//Object : 별찍기-1 | |
//question : 첫째 줄에는 별 1개, 둘째 줄에는 별 2개, N번째 줄에는 별 N개를 찍는 문제 | |
//Name : Hyeon Soo Lee | |
//Email : 99leehs@naver.com | |
public class ex12 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int j = sc.nextInt(); | |
for (int i = 1; i <= j; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
//Object : 별찍기-2 | |
//question : 첫째 줄에는 별 1개, 둘째 줄에는 별 2개, N번째 줄에는 별 N개를 찍는 문제 하지만 오른쪽을 기준으로 | |
//Name : Hyeon Soo Lee | |
//Email : 99leehs@naver.com | |
public class ex13 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int j = sc.nextInt(); | |
for (int i = 1; i <= j; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
//Object : 별찍기-3 | |
//question : 첫째 줄에는 별 N개, 둘째 줄에는 별 N-1개, ..., N번째 줄에는 별 1개를 찍는 문제 | |
//Name : Hyeon Soo Lee | |
//Email : 99leehs@naver.com | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
//Object : 별찍기-2 | |
//question : 첫째 줄에는 별 1개, 둘째 줄에는 별 2개, N번째 줄에는 별 N개를 찍는 문제 하지만 오른쪽을 기준으로 | |
//Name : Hyeon Soo Lee | |
//Email : 99leehs@naver.com | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int n = sc.nextInt(); | |
for (int i = 0; i < n ; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
//Object : 2007년 | |
//question : 2007년의 날짜에 따른 요일들을 | |
//Name : Hyeon Soo Lee | |
//Email : 99leehs@naver.com | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int m= sc.nextInt(); | |
int d= sc.nextInt(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
//Object : 합 | |
//question : n이 주어졌을 때, 1부터 n까지 합을 구하는 프로그램을 작성하시오. | |
//Name : Hyeon Soo Lee | |
//Email : 99leehs@naver.com | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int n = sc.nextInt(); | |
int i = n*(n+1)/2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
//Object : 평균 | |
//question : 세준이는 기말고사를 망쳤다. 세준이는 점수를 조작해서 집에 가져가기로 했다. 일단 세준이는 자기 점수 중에 최대값을 골랐다. | |
이 값을 M이라고 한다. 그리고 나서 모든 점수를 점수/M*100으로 고쳤다. | |
예를 들어, 세준이의 최고점이 70이고, 수학점수가 50이었으면 수학점수는 50/70*100이 되어 71.43점이 된다. | |
세준이의 성적을 위의 방법대로 새로 계산했을 때, 새로운 평균을 구하는 프로그램을 작성하시오. | |
//Email : 99leehs@naver.com | |
public class Main6 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); |