HTML 삽입 미리보기할 수 없는 소스 import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); for(int i = 0; i < a.length(); i++){ System.out.println(a.charAt(i)); } } }
HTML 삽입 미리보기할 수 없는 소스 import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = a + b; System.out.println(a + " + " + b + " = " + c); } }
HTML 삽입 미리보기할 수 없는 소스 import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); String answer = ""; for( int i = 0; i < a.length(); i++){ char str = a.charAt(i); if(Character.isUpperCase(str)){ answer += Character.toLowerCase(str); }else{ answer += Character.toUpperCase(str); } } System.out.println(answer..
HTML 삽입 미리보기할 수 없는 소스 import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.next(); int n = sc.nextInt(); for(int i = 0; i < n; i++){ System.out.print(str); } } }
HTML 삽입 미리보기할 수 없는 소스 import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); System.out.println("a = " + a); System.out.println("b = " + b); } }
HTML 삽입 미리보기할 수 없는 소스 import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); System.out.println(a); } }
리스트(List)와 문자열 배열(String Array)의 차이점 (feat. 배열 원소제거하기) Java에서 데이터를 저장하고 관리하는 데에는 여러 가지 방법이 있다. 그 중에서도 리스트(List)와 문자열 배열(String Array)는 많이 사용되는 방식이다. 리스트와 문자열 배열에 대해서 알아보고 두 가지의 차이점에 대해서 정리해 보겠다 리스트(List) 리스트는 크기가 가변적이다. 요소의 개수를 동적으로 조정할 수 있다. 리스트는 여러 종류의 객체를 저장할 수 있다. 예를 들어 정수, 문자열, 객체 등을 저장할 수 있다. 리스트는 요소의 추가, 삭제, 수정이 용이하다. 'add()', 'remove()', 'set()' 등의 메소드를 사용하여 요소를 조작할 수 있다. ArrayList, Link..
프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr HTML 삽입 미리보기할 수 없는 소스 import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); System.out.println(a+b); } }
프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr HTML 삽입 미리보기할 수 없는 소스 class Solution { public int solution(int[] num_list) { int sum = 0; int mul = 1; int answer = 0; for(int i = 0; i = 11){ sum += num_list[i]; answer = sum; }else{ mul *= num_list[i]; answer = mul; } } return answer; } }