#include <stdio.h>
#include <math.h>
#include <string.h>


int main(void){

    char str[50];
	FILE * fp=fopen("mystory.txt", "rt");
    if(fp==NULL)
    {
        puts("파일오픈 실패!");
        return -1;
    }

	for(int f=0; f<5; f++)
	{
		fgets(str, sizeof(str), fp);
    	printf("%s", str);
	}

    fclose(fp);
    return 0;
	
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: