U E D R , A S I H C RSS

새싹교실/2012/ABC반



1.



:
: 모

elwlwlwk12@naver.com

2.1. 1

2.1.1.

O
O
O
O

2.1.2.

1.
Virtual Box를 는 방.
virtual box를 .
virtual box 만들 .( 메모리 1024MB )
미디 를 마 .
.

2. VS2010
를 만.(빈 )
-만들- C++ .c를 붙 C.(C CPP는 .)

2.1.3.


elwlwlwk12@naver.com 보내 .
2 .

2.1.4.

모르 .-

2.2. 2

2.2.1.


1.
2.
3.


1.
.
만들 .
를들
int myfunction(int a, int b); 면 int 며 int 2 는 myfuction .
.

#include <stdio.h>

int myfunc(int num1, int num2){
  return num1+ num2;
}

int main(void){
  int a= 2, b= 3;
  int c= myfunc(a, b);
  printf("%d", c);
  return 0;
}

보면 myfunc는 int 료 2 num1 num2 를 더 .
int c= myfunc(a, b);
myfunc며 a,b를 .
럼 myfunc num1 a , num2 b .
c .
c는 5 .

.

#include <stdio.h>

int myfunc(int num1, int num2);

int main(void){
  int a= 2, b= 3;
  int c= myfunc(a, b);
  printf("%d", c);
  return 0;
}

int myfunc(int num1, int num2){
  return num1+ num2;
}

. 놓는 .
int myfunc(int num1, int num2);는 myfunc를 만들 .

int myfunc(int num1, int num2){
return num1+ num2;
}
러는 러를 .

2.

.
.
.

#include <stdio.h>

int num1= 6;

int myfunc(int num1, int num2);

int main(void){
  int a= 2, b= 3;
  int c= myfunc(a, b);
  printf("%d", c);
  return 0;
}

int myfunc(int num1, int num2){
  return num1+ num2;
}

num1 6 .
myfunc num1 num2를 더 는데 myfunc num1는 변 .
6+3 2+3 .

* 바람.

3.
if else, switch
if문밖 .
if문 if() true면 .

#include <stdio.h>

int myfunc(int num1, int num2);

int main(void){
  int a= 2, b= 3;
  int c=0;
  if(a== 2){
    c= myfunc(a, b);
  }
  printf("%d", c);
  return 0;
}

int myfunc(int num1, int num2){
  return num1+ num2;
}

if(a== 2)는 문 a .
a는 2 () true c= myfunc(a, b)를 .
는 보 0 며 1 . ( 0 )
if(1) 면 c= myfunc(a, b) .

2.2.2.



order 1 면 add 를 더
order 2를 면 sub 를 뺍.
c .

#include <stdio.h>

int add(/* */){
/* */
}

int sub(/* */){
/* */
}

int main(){
  int order;
  int a, b, c;
  scanf("%d",&order);
  scanf("%d%d",&a, &b);
  if(/* */){
    c= add(a, b);
  }
  if(/* */){
    c= sub(a, b);
  }

  printf("%d", c);

  return 0;
}

2.2.3.

-
는 느낌 -

느낌. ...-


2.3. 3


2.3.1.


마 ㅎㅎ

2.3.2.



1.
***
**
*
**
***
2.
*******
 *****
  ***
   *
3.
* * * * * *
 * * * * *
  * * * *
   * * *
    * *
     *
4.
**********
*  ****  *
*  ****  *
*  ****  *
**********
5.
*********
**** ****
***   ***
**     **
*       *
**     **
***   ***
**** ****
*********
HELL.
      *
     ***
    *****
*************
 ***********
  *********
   *******
  ***   ***
 **       **
*           * 
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:44
Processing time 0.0253 sec