* : 2011/5/14 5~ 7
* : 06
* : 11
* : 06
* : 11
4. ¶
- 1
#include <stdio.h> #define N 10 void selectionSort(int A[], int size); int main() { int i; int a[N]; for (i=0;i<N;i++) scanf("%d",&a[i]); selectionSort(a,N); for (i=0;i<N;i++) printf("%d\n",a[i]); return 0; } void selectionSort(int A[], int size) { int i,j,temp; for(i=0;i<size;i++){ for(j=i+1;j<size;j++){ if(A[i]>A[j]){ temp=A[i]; A[i]=A[j]; A[j]=temp; } } } // put your code here // sort in increasing order }
- 2
#include <stdio.h> #include <math.h> int main() { float float_val; int i,count = 0 ; float sum = 0; // float ave; //균 float val=0;// float dev; // float savePoint[20]; // declare variables here while (1) { scanf("%f",&float_val); if(float_val == -1) break; // put your code here savePoint[count] = float_val; count++; sum += float_val; ave = sum/count; } for(i = 0;i<count;i++){ val += pow((savePoint[i] - ave),2); } val = val / count; dev = sqrt(val); printf("%f",dev); // put your code here return 0; }
- 3
#include <stdio.h> #include <stdlib.h> #include <time.h> int main(void) { int i; int sum; int one,two; int sum_count[13] = {0}; // all initialized to 0 srand(time(NULL)); for(i=0;i<36000;i++){ one = rand()%6+1; two = rand()%6+1; sum_count[one+two]++; } for(i=2;i<13;i++){ printf("%d : %d(%f)\n",i,sum_count[i], (float)sum_count[i]/36000 ); } // put your code here return 0; }
6. 기 ¶
- 기 : 기 F4(ThreeFs + Future Action Plan) 게 .
- 기 갑기 ... 고 겠. . Ice Breaking 길!!! .. . 고 고 고 고. 간 게 겼 각(?) . 고 각 꾸. 간 그 각 겠. 그고 구 겠. ? -
- ice breaking ... ㅜ_ㅜ꺼 길... 각 기고 겠ㅠ_ㅠ 간 . 구 고, ( ). 구 , 까 기 고 . 그 while fgets 곳 null break if 4거( 4경) printf 4 .(ㅋㅋㅋ) 그고 2 .. ... 까 dev 공 겠. .. ㅠ_ㅠ 과 .. 꼭 공 ㅜ_ㅜ(그 .)c공고 공게 기 길!! 감 -
- .... 교 공 걸 고 ㅜㅜ 공 게 .(과 ㅋㅋㅋ) 게 게 고( 과 교&교고 과 교 과 ㅋㅋ) 과 ㅋㅋ 계 깨고 . 기고 겠ㅋㅋㅋ -
- 간 게 ICE Breaking 기 .. 겠고 기! ㅋㅋㅋㅋㅋ 개 게 군, 고 ICE Breaking 걸 각게 . -
- 기 고.. ?,..ㅠㅠㅠㅋㅋㅋㅋ 간 ! 그 ! ..ㅎㅎㅎ 구 간 ..과 2,3과 ..그 간 ! 그고 while 4거... 거 계 겠!ㅠㅠ 기 고 깼 ! ㅋㅋㅋ 근 ..ㅎㅎㅎ 그고 ! ! 꺅! 근 각... ㅋㅋㅋㅋ 겨거 거 ! 거 구 과 게!! -