Contents
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(5/9) - (for)
1.2.2. ¶
- 한 ( ), 하 하(1~3) .^^
- 한 파 , .c파 .
- 하 해 . 힘 해 .( 환 )
- 하 한 () 혔 하 ~
- 하 한 () 혔 하 ~
- C ~
- 한
- 파(Compile), (Build), 크(Linking) 해 .
- 형, 형 해 , 2 .
- char형 해 . ASCII 통해 하 .
- #include, , include .
- #define 하 , 한 '한' 하 해.
- ++, --, &&, ||, +,-, !=, ==, = 하 히 .
- if, else, else if 한 하 해. else else if 3 .
- switch-case 한 한 하 .(eg. Grade A,B,C)
- 90 A, 80 B . 100 10 switch .
- 90 A, 80 B . 100 10 switch .
- while 한 하 해 . C .
- do-while '' 해.
- for .
- 2 for 하 해.
- 파(Compile), (Build), 크(Linking) 해 .
1.
*****
****
***
**
*
2.
*
**
***
****
*****
- 혜, 희 푸 : .
- n 화하 하 .
- n 화하 하 .
1. ******* ***** *** * 2. * *** ***** ******* ***** *** *
- 한
- 형환 하
- 항 하
- 혜, 희 for 3, 4 해.(hint 2*n-1)
- 형환 하
- 한
- 함 , 하 .
- return .
- 함형 , void return하 .
- 함 .
- , ( ) .
- 한 한 하 .
- 함 , 하 .
- 한
- 함 한 하 .(eg.1~n 합, n!하)
- , (Search) 해 .
- 함 한 하 .(eg.1~n 합, n!하)
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.3.1. ¶
- 해 . 해.
- 해 한 해 .
- 해 한 해 .
1.0 1000 하 하 .
- /10, %10 해 해 .
3. 하 해 .
- 한 2 해 하 .
- if(10>x) printf(" ");.
- /10, %10 해 해 .
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 해.
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.101200 해 환하 '함' 해.(main sum=Sum(); printf("%d",sum); 해)
10.함 해 n! 하 해 .
11.n! 하 for 해.
12.함 해 110 하 해 .
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} . ()하, 하 해.
10.함 해 n! 하 해 .
11.n! 하 for 해.
12.함 해 110 하 해 .
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} . ()하, 하 해.
- 2 , 하 한 , 한 한 해.
- srand()함 , time() 해 하 하 해.
- 포 , 포 하 .
- 포 통 , 하.
- 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;
}
1.4.1.1. ¶
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(rand()%1000 한 1 1000 .)
11.Sort 하 해. 11 , 하, 하 .
12. 탕, int* a; int b; 했 &a,a,*a,&b,b 해 하, 하 해할 해.( 한 테트해 .)
12. 탕, int* a; int b; 했 &a,a,*a,&b,b 해 하, 하 해할 해.( 한 테트해 .)
1.5.1. ¶
- : /2012/AClass/4회
- . .
-
.png)
1.5.1.1. ¶
1~6.Koistudy.net 106~111
7.Koistudy.net 125, 152( 하 힘 하) 3n+1
7.Koistudy.net 125, 152( 하 힘 하) 3n+1
- accept
accept 패하 한 해 합^^
- 8 패하 해 푸 . 해
.png)
1 3 2 4 5 6 10 9 8 7 11 12 13 14 15 21 20 19 18 17 16
9.2포 하 3x3행 , 합 하 .
11. 탕, int* a; int b; int **c; 했 &c,c,*c,&a,a 해 하, 하 해할 해.
12. 행 행하, 해 .
- hint) Dp = (int**)malloc(sizeof(int*));
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. ¶
- LinkedList node 하 , 형태 해한 .
- Circular Queue .
- typedef , 한 .
- 하 student 하 , student 0~3 AClass 학 히 , 해.
- char 해 , 학 int형 .
- 해 , 해합.
- char 해 , 학 int형 .
1.5.2.4. 황혜 ¶
- 포 하
해 하 하 포 하 해해 .
할 해 .sizeof 함 하 할 할 크 해 malloc 하 .
int* p; p = (int *)malloc(SIZEOF(int)*n);
1.6.1. ¶
- : /2012/AClass/5회
- . .
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 , 하 한 해 합.(하!)
2.Swap함
3.3,4,6,7,9,3,2 2,3,9,7,6,4,3 하 해.(택)
4.BinarySearch , 하 한 해 합.(하!)
- 하 해 합. 확하
.png)
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 해.
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 하 해.
2.163 , 하 해.
3. Palindrome, Not Palindrome 하 해.
- level, racecar, deed palindrome, sadfds not Palindrome
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.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)
- 함 .
- C++ 활하 .(cin cout)
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
- c c++ cin,cout class,std using namespace std











.png)
