• 2021-04-14
    以下程序的功能是输入两个字符串,将其中最长的字符串输出。
    #include
    #include
    int main()
    {
    char ch1[10],ch2[10];
    gets(ch1);
    gets(ch2);
    if(strcmp(ch1,ch2)>0)
    puts(ch1);
    else
    puts(ch2);
    return 0;
    }