[데이터구조]선택정렬 & 이진탐색
- 최초 등록일
- 2003.04.15
- 최종 저작일
- 2003.04
- 7페이지/ MS 파워포인트
- 가격 1,000원
소개글
데이터구조(자료구조)수업에서 발표했던 발표자료입니다..
C로쓴자료구조론 책을 기본으로 작성했고
소스와 결과를 캡쳐해서 파워포인트로 작성했습니다
파일 안에 소스 들어있습니다...
목차
선택정렬소스
선택정렬결과
이진탐색소스
이진탐색결과
본문내용
#include <stdio.h>
#include <math.h>
#define MAX_SIZE 101
#define SWAP(x, y, t) ((t)=(x), (x)=(y), (y)=(t))
void sort(int [], int);
void main(void)
{
int i, n;
int list[MAX_SIZE];
printf("Enter the number of numbers to generate: ");
scanf("%d", &n);
if(n<1||n>MAX_SIZE){
fprintf(stderr, "Improper value of \n");
exit(1);
}
for(i=0; i<n; i++){
list[i]=rand() % 1000;
printf(" %d ", list[i]);
}
sort(list, n);
printf("\n Sorted array : \n");
참고 자료
C로쓴자료구조론
출판사:사이텍미디어
저자:이석호