<P>#include <stdio.h></P> <P>struct addr{<BR> char name[10];<BR> int age;<BR>};</P> <P>int main(void)<BR>{<BR> struct addr m1;</P> <P> int put,pput;<BR> char GirlFull[300];<BR> char NotGirlFull[300];<BR> char indis[300];</P> <P> FILE *in;<BR> FILE *FGirlFull;<BR> FILE *FNotGirlFull;<BR> FILE *Fdisplay;<BR> FILE *dis;</P> <P> in=fopen("in.txt","w");<BR> FGirlFull=fopen("GirlFull.txt","r");<BR> FNotGirlFull=fopen("NotGirlFull.txt","r");<BR> Fdisplay=fopen("display.txt","a");<BR> dis=fopen("display.txt","r");<BR> printf("부끄부끄 Test !! Ver 1.0 \n 무단 수정 및 재배포 대환영 \n");<BR> printf(" 코드 작성자 E-Mail : <a target="_blank" href="mailto:
[email protected]\n">\n</A>");</P> <P> </P> <P> <BR> </P> <P> </P> <P> while(put!=5)<BR> {<BR> printf("프로그램 시작 1. Test 명단 확인 2. 프로그램 종료 5.");</P> <P> scanf("%d",&put);<BR> switch(put)<BR> {<BR> case 1:<BR> printf("시작에 앞서 인적사항 기록을 하겠습니다.\n");<BR> printf("이름을 입력해 주십시오.\n");<BR> scanf("%s",m1.name);<BR> fputs(m1.name,in);<BR> fputs(m1.name,Fdisplay);<BR> printf("나이를 입력해 주십시오.\n");<BR> scanf("%d",&m1.age);<BR> printf("당신은 남자입니까 여자입니까? 1. 남자 2. 여자");<BR> scanf("%d",&put);<BR> switch(put)<BR> {<BR> case 1:<BR> printf("당신은 믿음직한 대한의 건아 시군요!\n");<BR> printf("당신은 이성친구가 많습니까? 1. 예 2. 아니오");<BR> scanf("%d",&pput);<BR> switch(pput)<BR> {<BR> case 1:<BR> printf("당신은 카사노바 일수도 있겠는걸요?\n");<BR> printf("그렇다면 당신은 이성친구가 편합니까? 1. 예 2. 아니오");<BR> scanf("%d",&pput);<BR> switch(pput)<BR> {<BR> case 1:<BR> printf("이럴 수가.. 당신의 결과가 저장되었습니다");<BR> fprintf(in,"%d ",m1.age);<BR> fprintf(Fdisplay," %d 남자\n",m1.age);<BR> fgets(GirlFull,300,FGirlFull);<BR> fputs(GirlFull,in);<BR> <BR> return 0;<BR> case 2:<BR> printf("이럴 수가.. 당신의 결과가 저장되었습니다");<BR> fprintf(in,"%d ",m1.age);<BR> fprintf(Fdisplay," %d 남자\n",m1.age);<BR> fgets(NotGirlFull,300,FNotGirlFull);<BR> fputs(NotGirlFull,in);<BR> <BR> return 0;<BR> default:<BR> break;</P> <P> }</P> <P> case 2:<BR> printf("아. 당신은 이성 친구가 별로 없군요\n");<BR> printf("그렇다면 당신은 이성친구가 불편합니까? 1. 예 2. 아니오");<BR> scanf("%d",&pput);<BR> switch(pput)<BR> {<BR> case 1:<BR> printf("이럴 수가.. 당신의 결과가 저장되었습니다");<BR> fprintf(in,"%d ",m1.age);<BR> fprintf(Fdisplay," %d 남자\n",m1.age);<BR> fgets(NotGirlFull,300,FNotGirlFull);<BR> fputs(NotGirlFull,in);<BR> <BR> return 0;<BR> case 2:<BR> printf("이럴 수가.. 당신의 결과가 저장되었습니다");<BR> fprintf(in,"%d ",m1.age);<BR> fprintf(Fdisplay," %d 남자\n",m1.age);<BR> fgets(GirlFull,300,FGirlFull);<BR> fputs(GirlFull,in);<BR> <BR> return 0;<BR> default:<BR> break;</P> <P> }<BR> }<BR> </P> <P><BR> case 2:<BR> printf("여자는 우리반에 없어.Bye!");<BR> fprintf(in,"%d 여자",m1.age);<BR> fprintf(Fdisplay," %d 여자\n",m1.age);<BR> return 0;<BR> default:<BR> printf("진지하게 눌러주시기 바랍니다.");</P> <P> }<BR> case 2:<BR> <BR> fread(indis,300,1,dis);<BR> puts(indis);<BR> <BR> <BR> <BR> <BR> }<BR> fclose(in);<BR> fclose(GirlFull);<BR> fclose(NotGirlFull);<BR> fclose(Fdisplay);<BR> fclose(dis);<BR> }<BR> return 0;<BR>}<BR>일단 안구 테러 죄송합니다. ㅠㅠ</P> <P> </P> <P>아까 낮에 출력을 못해서 검색을 하고 책보면서 코딩한결과</P> <P>fread(indis,300,1,dis);<BR>puts(indis);<BR></P> <P>로 출력은 성공했는데</P> <P> </P> <P style="TEXT-ALIGN: left"><img src="http://thimg.todayhumor.co.kr/upfile/201211/e36dcf74762356c7cba3e385f0b9bea5.jpg" class="txc-image" style="FLOAT: none; CLEAR: none" /></P> <P><BR>이런 고대 상형문자가 나옵니다.....</P> <P>이유가 뭐죠 ????ㅠㅠ</P>