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.

  • 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.

* 배념, . , . .

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.

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.

  • , 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.

  • , , 동
    .

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.

  • swap.
  • .
  • .
  • swap &a &b를 받 a b를 바 .!

1.6.2.2.

  • '->'는 !

  • '->' '동' :-S
  • .

1.6.2.4.

  • , 동
    는 대 보면
    .

1.7. 6(6/13)

1.7.1.

  • ...--;

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.15. 2-7(10/17)

1.15.1.

  • 1~7
  • 물 (딩 능 , Airline Ticketing)
  • 23 , 30

1.15.2.

  • , Airline Ticketing 1

1.16. 2-8(10/31)

1.16.1.


  • virtual, ,

1.16.2.

  • 7

1.17. 2-9(11/7)

1.17.1.


1.18. 2-10(11/14)

1.18.1.


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