Login
Immutable PageDiscussionInfoAttachments

Revision 1 as of 2012-05-11 17:38:30

Clear message
rei05/C言語/10021

MMA

#include<stdio.h>
#include<string.h>  
int main(){

int n,i,j;
char word[20]={0},top[20]={0};

scanf("%d\n",&n);

scanf("%s",top);
for(i=0;i<n-1;i++){
  scanf("%s",word);
  if(strcmp(word,top)<0){
    strcpy(top,word);
  }
}

printf("%s\n",top);

return(0);
}