#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
 
int main() {
    char c; /* 譁�ュ苓ェュ縺ソ蜿悶j逕ィ縺ョ螟画焚 */
    
    FILE *fpin, *fpout;
 
    if((fpin = fopen("input1.txt", "r")) == NULL){
        fprintf(stderr, "Failed to open: input1.txt\n");
        exit(1);
    }
 
    if((fpout = fopen("output1b.txt", "w")) == NULL){
        fprintf(stderr, "Failed to open: output1b.txt\n");
        fclose(fpin);
        exit(2);
    }
 
    while(fscanf(fpin, "%c", &c) != EOF){
        printf("%c", c);
        fprintf(fpout, "%c", c);
    }
    
    fclose(fpin);

    if((fpin = fopen("input1.txt", "r")) == NULL){
        fprintf(stderr, "Failed to open: input1.txt\n");
        exit(1);
    }
    
    printf("\n");
    fprintf(fpout, "\n");
    
    while(fscanf(fpin, "%c", &c) != EOF){
        printf("%c", toupper(c));
        fprintf(fpout, "%c", toupper(c));
    }

    fclose(fpin);
    fclose(fpout);

    return 0;
 
}