fork download
  1. #include <stdio.h>
  2. int main(void)
  3. {
  4. int i,j;
  5. int max=0;
  6. char arr[50];
  7. char back;
  8. scanf("%s",arr);
  9.  
  10. for(i=0;arr[i]!='\0';i++)
  11. {
  12. if(arr[i]>=max) max=arr[i];
  13. }
  14. printf("%d %c",max,max);
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 4484KB
stdin
LOVE
stdout
86 V