목차
프로그램 소스
프로그램 결과 창
프로그램 결과 창
본문내용
선택정렬 => ");
Select_Sort(sub_su);
for(i=0;i
{
sub_su[i]=main_su[i];
}
printf("** 삽입정렬 => ");
Insert_Sort(sub_su);
return 0;
}
int Bubble_Sort(int a[])
{
int i;
int j;
int temp;
for(i=0;i
{
for(j=0;j
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
Print(a);
return 0;
}
int Select_Sort(int a[])
{
int i;
int j;
int temp;
int min;
for(i=0;i
{
min=i;
for(j=i+1;j
{
if(a[min]>a[j])
{
min=j;
}
}
temp=a[i];
a[i]=a[min];
a[min]=temp;
}
Print(a);
return 0;
}
int Insert_Sort(int a[])
{
int i;
int j;
int temp;
for(i=1;i
{
temp=a[i];
j=i-1;
while(j>=0 && a[j]>temp)
{
a[j+1]=a[j];
j--;
}
a[j+1]=temp;
}
Print(a);
return 0;
}
int Print(int a[])
{
int i;
for(i=0;i
{
printf("%d ",a[i]);
}
printf("\n");
return 0;
}
프로그램 결과창
Select_Sort(sub_su);
for(i=0;i
sub_su[i]=main_su[i];
}
printf("** 삽입정렬 => ");
Insert_Sort(sub_su);
return 0;
}
int Bubble_Sort(int a[])
{
int i;
int j;
int temp;
for(i=0;i
for(j=0;j
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
Print(a);
return 0;
}
int Select_Sort(int a[])
{
int i;
int j;
int temp;
int min;
for(i=0;i
min=i;
for(j=i+1;j
if(a[min]>a[j])
{
min=j;
}
}
temp=a[i];
a[i]=a[min];
a[min]=temp;
}
Print(a);
return 0;
}
int Insert_Sort(int a[])
{
int i;
int j;
int temp;
for(i=1;i
temp=a[i];
j=i-1;
while(j>=0 && a[j]>temp)
{
a[j+1]=a[j];
j--;
}
a[j+1]=temp;
}
Print(a);
return 0;
}
int Print(int a[])
{
int i;
for(i=0;i
printf("%d ",a[i]);
}
printf("\n");
return 0;
}
프로그램 결과창
키워드
추천자료
컴퓨터 일반에 관한 고찰
학습지도안-프로그래밍(비주얼베이직)
함수형 프로그래밍
컴퓨터 발달의 역사
[컴퓨터운영체제][컴퓨터운영체계][OS]컴퓨터운영체제(OS), DOS(도스), 윈도우즈, 윈도우즈 3...
컴퓨터운영체제(OS)의 개념과 종류, 컴퓨터운영체제(OS)의 구성과 기능, 컴퓨터운영체제(OS)...
컴퓨터 바이러스에 대해
[IT와경영정보시스템]컴퓨터시스템 하드웨어의 직렬처리 방식에 비해 병렬처리 방식의 특징과...
(IT와경영정보시스템)(1) 일반적인 컴퓨터의 처리 방식인 직렬처리 방식에 비해 병렬처리 방...
제7차 컴퓨터교육과정에 대한 문제제기와 개선방향
중등(중학교) 컴퓨터교과(컴퓨터교육)의 교과목표, 중등(중학교) 컴퓨터교과(컴퓨터교육)의 ...
[컴퓨터교육][학교컴퓨터교육][컴퓨터교과][컴퓨터과]컴퓨터교육의 개념, 컴퓨터교육의 목표...
2009년 1학기 윈도우프로그래밍 기말시험 핵심체크
컴퓨터 시스템의 하드웨어를 분류하는 방식과 기준은 다양하다
소개글