hdu2025 查寻最大元素
hdu2025 查找最大元素原题: #include stdio.hint main(){char t[128]char maxint iwhile (gets(t)){f
hdu2025 查找最大元素
原题:
#include <stdio.h>int main(){ char t[128]; char max; int i; while (gets(t)) { for (max = i = 0 ; t[i] ; i++) { if (t[i] > max) max = t[i]; } for (i = 0 ; t[i] ; i++) { putchar(t[i]); if (t[i] == max) printf("%s", "(max)"); } putchar('\n'); } return 0;}