Rohyoohyun / C

0 stars 0 forks source link

9086 문자열 #22

Open Rohyoohyun opened 3 months ago

Rohyoohyun commented 3 months ago
#include <stdio.h>
#include <string.h>
int main(){
    int n;
    scanf("%d", &n);

    char str[n][1001];
    for(int i=0; i<n; i++)
        scanf("%s", str[i]);

    int len;
    for(int i=0; i<n; i++){
        len = strlen(str[i]);
        printf("%c%c\n", str[i][0], str[i][len-1]);    
    }

    return 0;
}