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.0267 sec