[전북대학교 A+] 자료구조 정리
본 자료는 2페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
해당 자료는 2페이지 까지만 미리보기를 제공합니다.
2페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

[전북대학교 A+] 자료구조 정리에 대한 보고서 자료입니다.

본문내용

queue [++rear] = item;
}
element deleteq()
{
/* remove element at the front of the queue */
if ( front == rear)
return queue_empty( ); /* return an error key */
return queue [++front];
}
▷polynomial
▷Implementation in C
▷ 소대문자변환
#include
main()
{
char ch;
while(1){
printf(\"문자입력:\");
scanf(\"%c\",&ch);
fflush(stdin);
if(ch>= \'a\' &&ch<= \'z\' )
{
printf(\"소문자로 입력하였습니다.\\n\");
printf(\"대문자로 변환 %c\\n\",ch-32);
}
else if( ch>= \'A\' &&ch<= \'Z\' )
{
printf(\"대문자로 입력하였습니다.\\n\");
printf(\"소문자로 변환 %c\\n\",ch+32);
}
else{
printf(\"잘못입력하였습니다.\\n\");
}
}
}
▷스왑
#include
void swap(int *a, int *b)
{
int temp;
temp=*a;
*a=*b;
*b=temp;
}
int main() {
int a,b;
printf(\"a를 입력하시오\\n\"); scanf(\"%d\",&a);
printf(\"b를 입력하시오\\n\"); scanf(\"%d\",&b);
swap(&a, &b);
printf(\"a=%d, b=%d\\n\", a, b);
}
▷직사각형
#include
struct rect
{
float weight1;
float height1;
float weight2;
float height2;
};
int main()
{
struct rect a;
printf(\"x1길이를 입력하시오 : \");
scanf(\"%f\",&a.weight1);
printf(\"y1길이를 입력하시오 : \");
scanf(\"%f\",&a.height1);
printf(\"x2길이를 입력하시오 : \");
scanf(\"%f\",&a.weight2);
printf(\"y2길이를 입력하시오 : \");
scanf(\"%f\",&a.height2);
printf(\"직사각형의 면적은 %.3f 입니다.\\n\",(a.weight1-a.weight2)*(a.height1-a.height2));
return 0;
}
  • 가격2,000
  • 페이지수6페이지
  • 등록일2024.01.19
  • 저작시기2024.01
  • 파일형식한글(hwp)
  • 자료번호#1237298
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니