C语言 用指针方法 输入3个字符串 按由小到大顺序输出

日期:2019-05-27 11:08:08 人气:1

C语言 用指针方法 输入3个字符串 按由小到大顺序输出

#include #include int main() { char str1[10],str2[20],str0[10]; printf("please input 3 strings"); gets(str1); gets(str2); gets(str0); if(strcmp(str1,str2)>0)swap(str1,str2);/*字符串比较函数*/ if(strcmp(str2,str0)>0)swap(str2,str0); if(str
    A+
热门评论