题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=2026
#include <stdio.h> int main() { char a[100]; char max; while (scanf("%s", &a) != EOF) { max=a[0]; for(int i=1;a[i]!='\0';i++){ if(max<a[i]){ max=a[i]; } } for(int j=0;a[j]!='\0';j++){ printf("%c",a[j]); if(a[j]==max){ printf("(max)"); } } printf("\n"); } return 0; }