![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FYmed7%2FbtrJm8aGJGz%2FRwmvaX99V1wQvG3mVwRCB0%2Fimg.png)
While로 sum구하기 실습 1-4 public class SumWhile { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); System.out.println("1부터 n까지의 합을 구합니다"); System.out.print("n의 값 : "); int n = stdIn.nextInt(); int sum = 0; int i = 1; while (i while문이 종료될 때 == 조건이 성립하지 않을 때 == i > n 일 때 i값 출력 For로 sum구하기 실습 1-5 public class SumFor { public static void main(String[] args) { Scanner stdIn..