oregonyuky / UNOESTE

1 stars 1 forks source link

fefef #3

Open oregonyuky opened 4 months ago

oregonyuky commented 4 months ago
#include <stdio.h>
#include <string.h>
#define TF 27
int main(){
    int j;
    char name[100];
    char res[TF], alfa[TF] = "abcdefghijklmnopqrtstuvwxyz";
    char ponto[TF][100] = {
        ".", "..", "...",
        ". .", ".. ..", "... ...",
        ". . .", ".. .. ..", "... ... ...",
        ". . . .", ".. .. .. ..", "... ... ... ...",
        ". . . . .", ".. .. .. .. ..", "... ... ... ... ...",
        ". . . . . .", ".. .. .. .. .. ..", "... ... ... ... ... ...",
        ". . . . . . .", ".. .. .. .. .. .. ..", "... ... ... ... ... ...",
        ". . . . . . . .", ".. .. .. .. .. .. .. ..", "... ... ... ... ... ... ... ...",
        ". . . . . . . . .", ".. .. .. .. .. .. .. .. .."
    };
    int a;
    while(scanf("%d", &a)!=EOF){
        j=0;
        while(a--){
            fflush(stdin);
            fgets(name, sizeof(name), stdin);
            name[strcspn(name, "\n")]='\0';
            for(int i=0;i<26;i++)
            {
            if(strcmp(name, ponto[i])==0){
                res[j] = alfa[i];
                j++;
            }
            }
        }
        for(int i=0;i<j;i++){
            printf("%c\n", res[i]);
        }
    }
    return 0;
}