네이버 지식인에 있는 글입니다. 출처 : 네이버 지식인 package Education; import java.util.Scanner; class Student { public static void main(String[] args) { Yeon[] s = new Yeon[10]; int st_num; String name, flag; int attend, assignment, quiz, mid, last; double total, j_total=0; char hakjum = ' '; int MAX_student = 10; int count = 0; double total_max=0, total_min=0, ave; Scanner scan = new Scanner(System.in); do { Syste..
지식in에서 퍼온겁니다. 예제가 좀 어려워보이고 소스를 잘짰네요.. 특히 입력을 할때 scanner 클래스를 썼다니.. http://kin.naver.com/detail/detail.php?d1id=1&dir_id=10106&eid=VilPG6I4OpXXUWnAeB0NUQlZ9vVYyI3H (Application Mark) Write a program that will store the cost of a CD at $19.99 and allow the user to purchase as many cd’s as they require. The output will be the subtotal, gst total, pst total and the total. Remember that sales tax con..
자바 벡터를 객체로 적용된 예제입니다. class Mem{ String name; int age; String address; Mem(String name, int age, String address){ this.name = name; this.age = age; this.address = address; } void Disp(){ System.out.println(name + "\t" + age + "\t" + address); } } class VectorTest1 { public static void main(String[] args) { Mem ob1 = new Mem("홍길동", 24, "서울"); Mem ob2 = new Mem("임꺽정", 28, "광주"); Mem ob3 = new Mem(..
자바 벡터 테스트 예제 기본입니다. 기본적인 기능을 있는 예제 입니다. class VectorTest { public static void main(String[] args) { /* // Vector의 요소 접근 java.util.Vector v = new java.util.Vector(); for(int i=0; i

자바로 된 선택 정렬 소스 입니다. class SelectionSort { public static void main(String[] args) { int data[] = {2, 9, 10, 3, 7, 15, 5}; System.out.println("원래 데이터: "); for(int i = 0; i< data.length; i++) System.out.print(data[i] + " "); System.out.println("\n"); System.out.println("버블 정렬 후"); for(int i=0; i

자바로 만든 버블 정렬 소스 입니다. 아주 간단한 소스이니 참고하세요. class BubbleSort { public static void main(String[] args) { int data[] = {2, 9, 10, 3, 7, 15, 5}; System.out.println("원래 데이터: "); for(int i = 0; i< data.length; i++) System.out.print(data[i] + " "); System.out.println("\n"); System.out.println("버블 정렬 후"); for(int i=0; i

자바로 구구단을 출력 하는 소스입니다. 보기 좋기 하기 위해서 약간의 소스가 추가 되었습니다. class gugu { public static void main(String[] args) { for(int i= 1; i
- 조건문 - if, switch 제어문 - 반복문 - while, do while, for * 조건문 1. if 1. if(조건식) - 참 문장; 조건식이 참이면 문장을 실행한다. (if의 기본적인 실행방법) Ascii(American Standard Code for Information Interchange) 컴터에서 인식 할 수 있는 코드값 class AsciiTest { public static void main(String[] args) { char ch = 97; System.out.println(ch); int i = 'B'; System.out.println(i); for(char ch1 = 'a'; ch1< 'z'; ch1++) System.out.print(ch1+" : " +(int)..