eclipse(495)
-
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
-
C 프로젝트 생성 w/ ANSI C Project
C 프로젝트 생성 w/ ANSI C Project eclipse 메뉴 >> File >> New >> 아래 사항 입력 및 선택 후 Finish Project name 프로젝트명 입력 Project type Hello World ANSI C Project 선택 Toolchains MinGW GCC 선택
-
SwitchEx05-no break/switch+break
switch~case문과 switch~case~default 레이블 유무에 따른 출력결과 확인 소스코드 public class SwitchEx05 { public static void main(String[] args) { int n=3; // int n=7; // int n=10; switch(n) { case 1: System.out.println("First"); case 2: System.out.println("Second"); case 3: System.out.println("Thrid"); case 4: System.out.println("Fourth"); case 5: System.out.println("Fifth"); case 6: System.out.println("Sixth"); cas..
-
생성자 함수를 이용한 객체 생성- 08.html
생성자 함수를 이용한 객체 생성 생성자 함수는 대문자로 시작, 명사형식 일반 함수는 소문자로 시작, 동사형식 소스 코드 //생성자 함수 function Person(name){ this.name = name; } //객체 생성 var mySon = new Person('홍길동'); //출력 document.write(mySon.name + ' '); document.write(mySon['name'] + ' '); 출력결과
-
IfEx03.java-다중 if문 ( 성적 등급 처리)
조건문 - 다중 if문 ( 성적 등급 처리) 소스코드 public class IfEx03 { public static void main(String[] args) { java.util.Scanner input = new java.util.Scanner(System.in); int score; char grade; System.out.print("성적을 입력하세요 > "); score = input.nextInt(); if( score >= 90 && score = 80 && score = 70 && score =60 && score