3 回答

望遠
TA貢獻1017條經驗 獲得超1032個贊
#include?<stdio.h> #include<string.h> void?main() { char?str1[]="welcom?to?China!"; char?str2[]="welcom?to?America!"; switch(strcmp(str1,str2)) { case?1:printf("1>2\n");break; case?-1:printf("1<2\n");break; default:printf("1=2\n"); } }
點擊展開后面1條
添加回答
舉報
0/150
提交
取消