일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 국회의원 & 높으신 분들 어록
- https://tecoble.techcourse.co.kr/post/2021-08-07-logback-tutorial/
- https://minkwon4.tistory.com/161
Archives
- Today
- Total
OPEN between Secret
a 에서 z 까지 출력(do while)
public class maytoone { public static void main (String[] args) { char al = 'a'; do { System.out.print(al); al = (char) (al + 1) ; } while (al
java/예제
2012. 5. 6. 22:41
입력된 수의 평균 구하기
import java.util.Scanner; public class maytoone { public static void main (String [] args){ Scanner sc = new Scanner(System.in); int n = 0; double sum = 0; int i = 0; while ((i = sc.nextInt()) !=0){ sum = sum + i; n++; } System.out.println("입력된 수의 개수는" + n + "개이며 평균은 " + sum /n + "입니다."); } } -------------------------------------------------------------------------------- 입력된 숫자들을 표시해주고 (i = sc...
java/예제
2012. 5. 6. 22:19