U E D R , A S I H C RSS

새싹교실/2012/AClass

1. AClass

1.1.

  • : C부 료구 ㅋ복ㅋ
  • : 매 3~4반.
  • : 과 jereneal20@.로 보내.
  • :
    • :
    • : 곽길문, , ,
  • :
    • 1(5/9) - 검 및 기(for문)
    • 2(5/16) - , 배 + Search
    • 3(5/23) - 다, + Search, Sort
    • 4(5/30) - 구, 2 + Stack, Queue
    • 5(6/6) - C++ 기, String + Linked list (는 날 )
    • 6(6/13) - 1~5 .
    • 디를 - Class, Object + Tree, Graph
      • 가능 다.. 디까 나가느냐는 달려다.
      • 는 부보다 는 부 로 많다.

    1. /2012/AClass/1
    2. /2012/AClass/2-2
    3. /2012/AClass/2-6
    4. /2012/AClass/2
    5. /2012/AClass/3
    6. /2012/AClass/4

1.2. 1(5/9)

1.2.1.

  • , if문 , for문

1.2.2.

  • 딩과 로그램 고(러나 록), 는 문게(1~3) .^^
  • 그냥 되고, .c 보내다.
  • 다. 꼭 .(견 교 가능)
    • (딩)문떤부 ~
  • 가 과 내면 꼭 C 빌려 ~



    1. (Compile), 빌드(Build), 링(Linking) 보고 .
    2. , 변 고, 그 를 2개만 들.
    3. char . ASCII드를 낸다는 것 .
    4. #include, 리과 고, include 를 들.
    5. #define 고, '' 로그램 .
    6. ++, --, &&, ||, +,-, !=, ==, = .
    7. if, else, else if문 로그램 . else나 else if를 3 .
    8. switch-case문 로그램 .(eg. Grade기 A,B,C)
      • 90 A, 80 B다. 100 10로 나면 switch문 다.
    9. while문 로그램 . C나 과 다.
    10. 로그램 do-while문로 바꿔 '똑같'로그램.
    11. 로그램 for문로 바꿔 .
    12. 2 for문 기를 .

1.
*****
 ****
  ***
   **
    *
2.
*
**
***
****
*****
  1. 나, 나만 는 과: 다 기를 만들.
    • n 기를 록 만들면 더 다.

1.
*******
 *****
  ***
   *
2.
   *
  ***
 *****
*******
 *****
  ***
   *
  • 가 과


    1. 나, 나 과를 for문 각각 3개, 4개만 .(hint 2*n-1)

    1. 가 무 고, 로그램 나 만들 .
    2. return .
    3. 고, void return .
    4. 가 무 .
    5. 고, 란 개념났는( ) .
    6. 로그램 나 만들.
  • 가 과
    1. 로그램 .(eg.1~n까 , n!구)
    2. 고, 그 배 로그램(Search) .

1.2.3.

1.2.3.1.

  • 1.러란?
    --> 로그래밍 블리로 변고 그 블리를 기 로 변 는 것
    2.#include란?
    --> 라브러리 리가 는 것
    3.return 0?
    --> 로그램 료를
    4.나를 10보다 력, 10보다 두배를
    -->

#include <stdio.h>
        int main(){
            int a;
            scanf("%d",&a);

            if(a>10)
               printf("%d",a*a);
            else if(a<10)
               printf("%d",2*a);

            return 0;
        }


     #include <stdio.h>

       int main(void)
      {
	int i;
	int j;
	int n;
	int k;

	scanf("%d",&n);


	for(i=n;i>=1;i--)
	{
		for(j=1;j<n+1-i;j++)
		{
				printf(" ");
		}
		for(j=1;j<=2*i-1;j++)
		{
			printf("*");
		}
		printf("\n");
	  }
	  return 0;
      }
         

1.2.3.2.

-복 for문 .
-감 : :*)

1.2.3.3. 곽길문

  • 다. 공 ....-L-
    다. ..ㅋㅋㅋ늘 공 는 부 ~
    .. 반문되 ..ㅋㅋㅋ
    는 반문말고

1.2.3.4.

  • 내가 다른람보다 더 겠다는
    !

1.3. 2(5/16)

1.3.1.

  • 녁까 면 됩다. 겠다는 문는 미리 말.
    • 딩 과 는 과 면 됩다.


  • 1.0과 1000 모든 릿를 더 로그램 .
    • /10, %10 .
    2.를 대문로 바꾸는 로그램 .
    3.다 로그램 .
    • 다가 2는 것 되고 다.
    • 방법 if(10>x) printf(" ");다.

 1
 2  3
 4  5  6
 7  8  9 10
11 12 13 14 15
16 17 18 19 20 21
4.다 로그램 .

                1
             2  3
          4  5  6
       7  8  9 10
   11 12 13 14 15
16 17 18 19 20 21
5.로그램 로그램 .( 로그램 21 력)
6. 로그램대로 로그램 라미드 .
7. 로그램대로 로그램몬드 .
8.로그램 60 는 F, 61~70 D, 71~80 C, 81~90 B, 90~ A 로그램 .

#include <stdio.h>
int main(){
	int num;

	printf(" 력 : ");
	scanf("%d", &num);

	switch(num/10){
		case 10 :
		case 9 :
			printf("A\n");
			break;
		case 8 :
			printf("B\n");
			break;		
		default :
			printf("???\n");
			break;
	}
			
}
9.101부200까 모든 를 더는 ''를 .(main문는 sum=Sum(); printf("%d",sum); )
10. n! 로그램 .
11.n! 로그램 for문.
12. 1부10까를 더로그램 .
13.배 {7,4,2,9,3,1,2}가 들다. 3 로그램 .
14.배 {7,4,2,9,3,1,2}가 들다. 1 로그램 . (단, 7 다)
15.배 {7,4,2,9,3,1,2}가 들다. 2가 를 검고, 다면 로그램 .
16.배 {7,4,2,9,3,1,2}가 들다. 렬(로)고, 로그램 .

    1. 2 고, 떻게 뒤, 로그램 .
    2. srand()가 무 고, time() 랜덤로그램 .
    3. 가 무 고, 는 방법 .
    4. 보고, .

1.3.2.

1.3.2.1. 곽길문

* 배개념, 다. 과 내기, 기. 다.

1.3.2.2.

  • , , 배.
  • , 복 ! :-)

1.3.2.3.

  • : 를 다

#include <stdio.h>

int fact(int n)
{
	int sum;

	if(n==1)
		return 1;
	else
		sum=fact(n-1)*n;

	return sum;


}

int main()
{
	int n;

	scanf("%d",&n);

	printf("%d\n",fact(n));

	return 0;
}

swap : 두 개 를 바꾸기
: 변러개

느낀 : 던 내 다. 겠다:-@
  • 가 그 부 드려드렸다.. 과 80%가 ! -

1.3.2.4.

  • , 배는데 던것 같 린다
    미리 듣기 다.로는 겠다.
    • 가 다 때는 는게 . 그러면 당량 겠더라는.. -

1.4. 3(5/23)

1.4.1.

1.4.1.1.

1~5.www.koistudy.net 100~104 Accept기( 면 그 문 보내)
6. swap 보기(대부 다. 따라 보고 드를 )
7.2(4x4) 두개 로그램 .
8.다 력되는 로그램 .

1  2  3  4  5
10 9  8  7  6
11 12 13 14 15
20 19 18 17 16
21 22 23 24 25
9. 나를 .
10.LinearSearch를 구. 배 1000개로 고, random 1부 1000까 를 랜덤로 배 , 777 면 됩다. 로그램 다 결과가 달라?
(rand()%1000 다면 1 1000까 가 나다.)
11.Sort를 나 구. 11과 같 방법를 랜덤 , 고, 렬된 것 면 됩다.
12.던 내로, int* a; int b;로 때 &a,a,*a,&b,b 각각 고, 떤 것 떤 것과 는 것 말로 .( 드를 보고 보는 것 방법다.)

1.4.1.2.

1.구가 무 보고, 나를 만들.
2.동 보고, 동 는 방법 .
3.가 무 보고, 2로 만들.
4., 가 무 고, 를 만들.

1.4.2.

1.4.2.1.

  • , 2
  • www.koistudy.net 가
  • ! 농 ! :D

1.4.2.2.

* 다.
리긴 만 과 개념 겠다.

1.4.2.3.

  • 라미드 모 , 2, 를 배다.
    고 고는데 로는 머리로 겠다는것 보면다ㅜㅜ
    그리고 과 빨리 !!

1.4.2.4. 곽길문

낸 것 라미드 다몬드 기를 다 다.
다.

1.5. 4(5/31)

1.5.1.

1.5.1.1.

1~6.Koistudy.net 106~111
7.Koistudy.net 125, 152(둘다 들면 나만) 3n+1
  • accept :) accept는데 나 다른게 물 다^^
8.다 력되는 로그램 .
  • 8 당 문다. 나 다른게 물 :)

1  
3  2  
4  5  6
10 9  8  7
11 12 13 14 15
21 20 19 18 17 16
9.2 3x3 두개 만들고, 두 배 로그램 .
  • hint) Dp = (int**)malloc(sizeof(int*));
10.3 10 . 는 반드 다. 모르면 물되고, 다른 드를
11.던 내로, int* a; int b; int **c;로 때 &c,c,*c,&a,a 각각 고, 떤 것 떤 것과 는 것 말로 .
12. 드가 고, 그런 값 다.

int* a;
int b=5;
int** c;
 c=&a;
 a=&b;
 **c=9;
 printf("%d %d",*c,**c);

1.5.1.2.

  1. LinkedList node를 는 방법 보고, 그런 .
  2. Circular Queue가 무 .
  3. typedef가 무 보고, .
  4. student 구나 만들고, student 구 만들 0~3 AClass 보를 고, 그것 .
    • 내부 char 배 고, int 다.
    • 가 무 되는 경 반드 게 물보고, 과다.

1.5.2.

1.5.2.1.

  • 검, , 동
    렵기 린다 보고 더 공부겠다.

1.5.2.2. 곽길문

  • 때 100% 다고 말만 그래 것들 무나 뿌듯다.
    미를 많 깨닫고 다.
    고 과 낼게

1.5.2.3.

  • , 동
  • 당 구떻게 보려구 데 과 ! :) 보고 모르면 .
  • ;^)

1.5.2.4.


  • 개념 기 때문 다.
    다.sizeof라는 기를 고 malloc 만들 다.
    int* p;
       p = (int *)malloc(SIZEOF(int)*n);

1.6. 5(6/6)

1.6.1.

1.6.1.1.

1.KoiStudy 112~113,115~122 - 문기같 몇개 .
2.Swap
3.3,4,6,7,9,3,2를 2,3,9,7,6,4,3로그램 .()
4.BinarySearch가 무 보고, 가능 다.(가능면!)
  1. 로그램 떻게 다. 그 방법 다고 각되면 :)

1  2  3  4  5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9
6.LinkedList를 구 는 구나 만들고, 그 구 linkedlist나를 만들다.
7.동 list가 몇개 결되는 구를 만들다. list->next->next = 동당;
8.LinkedList를 만들고, 리 data 4,5,3,7,12,24,2,9가 들다.

1.6.1.2.

1.Koistudy163
2.163고, 그 문떻게 다.
3.문 Palindrome, 닌경 Not Palindrome 로그램 다.
  • level, racecar, deed는 palindrome, sadfds는 not Palindrome

1.6.2.

1.6.2.1.

  • swap 만드는 것다.
  • 당과 드 리 만드는 법다.
  • 것 같다.
  • swap &a &b를 a b를 바꾸는 겠다.!

1.6.2.2.

  • '->'는 런 뜻구나!
  • 당 복
  • '->' '동당' 공부:-S
  • 드리 .

1.6.2.3. 곽길문

1.6.2.4.

  • , 동당 복드리
    때는 대 가 된 보면 더 공부
    겠다. 근데 렵다

1.7. 6(6/13)

1.7.1.

  • 만 기말 리로 다...--;

1.7.2.

1.7.2.1.

#include <stdio.h>
#include <stdlib.h>
typedef struct node node;
struct node{
	int data;
	struct node* next;
};

int main(){
	int i;
	node* head=(node*)malloc(sizeof(node));
	node* tmp = NULL;

	tmp=head;

	for(i=0 ; i<10 ; i++){

		tmp->data=i+1;
		tmp->next = (node*)malloc(sizeof(node));
		//printf("%d\n",tmp->data);
		tmp=tmp->next;
	}

	tmp=head;
	for(i=0 ; i<10; i++){
		printf("%d\n",tmp->data);
		tmp=tmp->next;
	}


	return 0;
}

것 같데 그래 노력 .....

1.7.2.2.

  • 드리 는 방법다.



#include <stdio.h>

struct node{
	int data;
	struct node *next;
};


int main()
{

	struct node *head=(struct node*)malloc(sizeof(struct node));
	struct node *tmp = NULL;
	int i;
	int n;

	tmp=head;

	for(i=0;i<10;i++)
	{
		tmp->next=(struct node*)malloc(sizeof(struct node));
		tmp->data=i+1;
		
		tmp=tmp->next;

		
		tmp->next=NULL;
	}
	scanf("%d",&n);

	for(tmp=head;tmp->next!=NULL;tmp=tmp->next)
	{
		if(tmp->next->data==n)
			tmp->next=tmp->next->next;
		printf("%d ",tmp->data);	
	}

	
	return 0;

}

1.7.2.3.

  • 드리ㅎㅎㅎㅎㅎㅎ
    #include<stdio.h>
    #include<stdlib.h>
    typedef struct node node;
    
    struct node{
    	int data;
    	struct  node *next;
    	};
    int main(void){
    	int i;
    
    	node *head = (node *)malloc(sizeof(node));
    	node *tmp = NULL;
    	
    	tmp = head;
    
    	for(i=0;i<10;i++){
    
    		tmp->data = i;
    		tmp->next = (node *)malloc(sizeof(node));
    
    		tmp = tmp->next;
    		
    	
    	}
    	tmp = head;
    	for(i=0;i<10;i++){
    			printf("%d\n",tmp->data);
    			tmp = tmp->next;
    	}
    	
    
    	return 0;
    }
    
       

1.7.2.4. 곽길문

드 리 ~

~~
방~

1.8. 2-1(8/30)

1.8.1.

1.8.2.

  • Overview,

1.8.3.

*
c를 복다. 를 복는데 다 공부 겠다.
*
내내 가 난다. 복 겠다. :-)
*
는데 난다! C 겠다.

1.9. 2-2(9/6)

1.9.1.

  • 리는 곳: /2012/AClass/2-2
  • 밤까다. 늦 .
    1.동는 방법
    2.Swap 보기
    3.call by value, call by reference 고, 그것 떤 것, 떤 문기는 .
    4.Linked List , 고, .
    5.Struct란?
    6.Object Oriented Programming .
    7.객 보고, .
    8.Class란?()
    9.Overloading란?
    10.public과 private 다.
    11.Koistudy 126~130, 146, 148, 149
    • C++ 문법 다.(cin cout)
    • .

1.9.2.

  • 당, Swap, OOP, Class, Struct, call by value/reference

1.9.3.


  • pointer, swap, malloc, struct 문법고 c++를 배다. iostream
    using namespace std다. using namespace std는 cin, cout 붙는 'std::'를 다.
    c다 '\n'는 c++는 endl로 다는 것다.

  • -#include <iostream> 과 using namespace std;

#include <iostream>
using namespace std;

int main(){
	int a;
	cin>>a;
	cout<<a<<endl;
}

  • swap 복

#include <stdio.h>
#include <iostream>
int swap(int*, int*);
int main(){
	int a,b;
	a=10;
	b=20;

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

	return 0;
}
int swap(int *a, int *b)
{
	int temp;
	temp=*a;
	*a=*b;
	*b=temp;

	return 0;
}
-로딩 로다


    • c c++ 다른 문법과 cin,cout class,std는 using namespace std를 배

1.10. 2-3(9/12)

1.10.1.

  • cmd, main parameter법, static, const

1.10.2.

1.Koistudy 126~130, 146, 148, 149 - 못

1.10.3.


  • class 개념다.
    private public 다.
    private를 면 남 다.
    public 무나 다.

  • swap, malloc test
    private과 public
    private를


  • ,public과 private

1.11. 2-4(9/19)

1.11.1.

1.11.2.

  • static, const 란??

1.11.3.




  • LargeInt! , overflow 발
    뿌듯
    !


  • private, public 각각 릿를 만들다.
    가 9보다 면 그 다 1 만들다.
    는 법다.

1.12. 2-5(9/26)

1.12.1.

  • , , , default , this, overloading .
  • struct vs class

1.12.2.

  • 던 Person Bird 다.
    • (0m) 고, 다른 높 다.
    • 리를 다.(distance)
    • Bird는 날 다. (때를 대) 빨리 날 다.
    • 는 A,B가 는데, A는 객를 만들 때 기본 되고, B는 객 를 다르게 다.

1.12.3.

  • - , 다. 는가.... 못된 다는데. ,,ㅂ 로딩 각났다. - 명과 같게 다.
  • - 나는 빽 블릭/리베 동 private 구동 public . 다 때 복 + bigInt 다n개로.
  • - . this 법. 그리고 ......... 디 그리고 늘 배게 끝데...

1.13. 2-6(10/10)

1.13.1.

  • 딩, static, , protected, return 로딩 관련

1.13.2.

1.13.3.

  • - 다. protected가 무로딩, 다. static과 const다.
  • -
  • - , 디 , 로딩과 , static를 배

1.14. 2-7(10/17)

1.14.1.

  • 1~7
  • 물 (딩 능력 미로기, Airline Ticketing)

1.14.2.

  • 미로기, Airline Ticketing 1

1.14.3.


1.15. 2-7(10/17)

1.15.1.

  • 1~7
  • 물 (딩 능력 미로기, Airline Ticketing)
  • 23 , 30

1.15.2.

  • 미로기, Airline Ticketing 1

1.15.3.

1.16. 2-8(10/31)

1.16.1.

  • 검 및
  • virtual, , 객

1.16.2.

  • 7

1.16.3.

1.17. 2-9(11/7)

1.17.1.


1.17.2.


1.17.3.


1.18. 2-10(11/14)

1.18.1.


1.18.2.


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