Ŀ

գҪıйص䡣
йɫӢĵʣ#Ϊ־ЩкɫӢĵС20ɫӢĵʳȾ10ַ
ʾΪ˵
룺
red
blue
yellow
green
purple
#

blue  green  purple  red  yellow  



#include <stdio.h>
#include<stdlib.h>
#include<string.h>
void main()
{
    int i,j, n = 0;
    char *color[20], str[10], *temp;
   
    scanf("%s", str);
    while(str[0] != '#') {
        color[n] = (char *)malloc(sizeof(char)*(strlen(str)+1));  
        strcpy(color[n], str);
	    n++;
        scanf("%s", str);
    }
/*---------*/        
    for(i = 0; i < n; i++) 
        printf("%s  ", color[i]);
    printf("\n");
}
