Login
Immutable PageDiscussionInfoAttachments
rei05/C言語/10021

MMA

   1 #include<stdio.h>
   2 #include<string.h>  
   3 int main(){
   4 
   5 int n,i,j;
   6 char word[20]={0},top[20]={0};
   7 
   8 scanf("%d\n",&n);
   9 
  10 scanf("%s",top);
  11 for(i=0;i<n-1;i++){
  12   scanf("%s",word);
  13   if(strcmp(word,top)<0){
  14     strcpy(top,word);
  15   }
  16 }
  17 
  18 printf("%s\n",top);
  19 
  20 return(0);
  21 }

rei05/C言語/10021 (last edited 2012-05-12 01:33:31 by rei05)