for(21)
-
ForEx03.java-for문
1부터 100까지의 누적 합 구하기 소스코드 public class ForEx03 { public static void main(String[] args) { int total = 0; for(int i=1; i
-
ForEx02.java-비교인자값 감소/증가 시키기
비교인자값 감소/2씩 증가시키기 소스코드 public class ForEx02 { public static void main(String[] args) { // 비교인자값 감소 System.out.println("비교 인자값 1씩 감소 시키기:"); for(int i=5; i>=1; i--){ System.out.print("\t"+ i); } System.out.println(); System.out.println("\t프로그램 종료!"); // 비교인자값 2씩 증가시키기 System.out.println(); System.out.println("비교 인자값 2씩 증가시키기 1:"); for(int i=0; i
-
ForEx01.java-for()문, 비교 인자값 증가
비교 인자값 증가 소스코드 public class ForEx01 { public static void main(String[] args) { for( int i=1; i