#include <stdio.h>
#include <math.h>
#include <string.h>
int main() {
printf("%.1f\n", pow(2,3));
printf("%.1f\n", sqrt(4));
printf("%.1f\n", ceil(1.2));
printf("%.1f\n", ceil(-1.2));
printf("%.1f\n", floor(1.2));
printf("%.1f\n", floor(-1.2));
char a[100]="woman";
printf("크기: %lu\n", strlen(a));
char dest[]="DLAB";
char origin[]="W09";
printf("결과 : %s\n", strcat(dest,origin));
char A[]="AA";
char B[]="AA";
char C[]="BB";
printf("A와 B 비교 : %d\n", strcmp(A,B));
printf("A와 c 비교 : %d\n", strcmp(C,A));
printf("A와 c 비교 : %d\n", strcmp(A,C));
char str1[100];
char str2[100];
char combined[200];
printf("두 문자열을 입력하세요 :\n");
scanf("%99s %99s", str1, str2);
size_t len1 = strlen(str1);
size_t len2 = strlen(str2);
printf("길이 : %ld %ld\n", len1, len2);
strcpy(combined, str1);
strcat(combined, str2);
printf("합치기 : %s\n", combined);
printf("비교 : %d\n", strcmp(str1, str2));
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: