U E D R , A S I H C RSS

새싹교실/2012/나도할수있다



1.

  • :
  • : 호,

1.1.

  • . -
  • c . -
  • c A+. -

2.

  • 15:00 ~ 17:00

2.1. 1회

2.1.1.

O
O
O

2.1.2.

  • ICE Breaking : , . -
. -
C . -

  • GCC


	char name = 'A';
	int b = 2;
	float c = 2.1;
	double d = 4.5;

	
	printf("%c",name);
	printf(":%c\n:%d\n1:%f\n2:%.2f",a,b,c,d);
  • while

	while(1){
		printf("");
	}
  • do-while

	do{
		printf("");

	}
	while (1);
  • for

	int i;
	
	for(i=0;i<10;i++) {
		printf("for\n");
	}

2.1.3.

  • . . . gcc , gdb . printf , , while,do-while,for . , . . . -
  • . . -
  • . . . . . -
  • 3 22, 6, c visual studio . 함 . for,while . . . - 호 회
  • c. . -

2.2. 2회

2.2.1.

2012/3/29
O
O
O

2.2.2.

  • for, while

/* for  한 1 10 합 */
	int i,sum=0;
	for(i=0;i<=10;i++) {
		sum += i;
	}
	printf("%d",sum);
/* while  한 1 10 합 */
	int i=1,sum=0;
	while (i<=10) {
		sum += i;
		i++;
	}
	printf("%d",sum);	

    • #define
    • srand(time (null))
    • getch()
    • switch() { case : default :}
    • break;
  • ACM

2.2.3.

  • ()ACM 2
  • MP,,

2.2.4.

  • for,while . 1 10 . . 핑하, . . MP , . -
  • while 1 10 . . . . define . select=getch() . break . . . 히 해. . -
  • . for,while . ..ㅠㅠ .... 2
;ㅠㅠㅠㅠㅠㅠㅠㅠ....;;-

2.3. 2회()

2.3.1.

2012/4/4
O
O
O

2.3.2.

  • for, while 2

2.4. 3회

2.4.1.

2012/4/5
O
O
O

2.4.2.

  • , , , 포

/* 함  (  1 ) */
#include <stdio.h>

char isOne (int num1) {

	if (num1 == 1) {
		return 'T';
	} else {
		return 'F';
	}

}	

int main () {

	int a,b=1;

	a = isOne(b);

	printf("%c",a);

	return 0;
}
/* a,b */
#include <stdio.h>


void swap(int *c,int *d) {

	int tmp;

	tmp = *c;
	
	*c = *d;
	*d = tmp;
}

int main () {

	int a=3,b=5;

	printf("%d %d\n",a,b);
	
	swap(&a,&b);

	printf("%d %d",a,b);

	return 0;
}	
/*   */
#include <stdio.h>


int main () {

	char a[100] = "hello word!";
	

	printf("%s",a);


	return 0;
	

}
/*  */
#include <stdio.h>

typedef struct character {
	int HP;
	int MP;
} char_;

int main () {

	struct character My = {1000,1000};
	struct character Sora = {2000,2000};
	char_ sunjun = {10000,10000};

	My.HP -= 100; //  100 

	printf("  : %d",My.HP);

	return 0;
	
}

2.4.3.

  • -1000

  • 3.pdf

2.4.4.

  • . 함, , , 포 . . , . -
  • . . .ㅠㅠ . . . 포 . . -
  • . 함, , , 포 . ㅋ . ㅋㅋ . ㅋㅋㅋㅋ ㅋㅋㅋ . ㅋ-

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:45
Processing time 0.0346 sec