从键盘输入10个字符串存入二维字符数组中,
* 求出其中最大者并输出。
2条回答 默认 最新
threenewbee 2016-06-11 14:41关注char input[10][100]; char * max = &input[0]; for (int i = 0; i < 10; i++) { scanf("%s", &input[i]); if (strcmp(max, &input[i]) < 0) max = &input[i]; } printf("%s", max);解决 无用评论 打赏 举报