{ int Type1num1,Type1num2,choice,c,area,Type2num1,Type2num2; printf(" \nchoice !! number 1 type is 010-0000-0000, number 2 type is 000-000-0000 : "); scanf("%d",&choice);
if(choice == 1){ do{ printf(" Please enter the central four-digit : "); scanf("%d",&Type1num1); printf(" Enter the last four digits : "); scanf("%d",&Type1num2); printf(" The number you have written is 010-%d-%d\n\n",Type1num1,Type1num2); }while((c=getchar())=='Q'); } if(choice ==2){ printf(" Is any area ?\n Seoul is number 1 \n Busan is number 2 \n Daegu is number 3 \n Incheon is number 4 \n Gwangju is number 5 \n Daejeon is number 6 \n Ulsan is number 7 \n Kyeonggi is number 8 \n Gangwon is number 9 \n Chungcheon is number 10 \n Chungnam is number 11 \n Jeonbuk is number 12 \n Jeonnam is number 13 \n Gyeongbuk is number 14 \n Gyeongnam is number 15 \n Jeju is number 16"); scanf("%d",&area);
do{ switch(area){ case 1: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 02-%d-%d ",Type2num1,Type2num2); break; case 2: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 051-%d-%d ",Type2num1,Type2num2); break; case 3: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 053-%d-%d ",Type2num1,Type2num2); break; case 4: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 032-%d-%d ",Type2num1,Type2num2); break; case 5: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 062-%d-%d ",Type2num1,Type2num2); break; case 6: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 042-%d-%d ",Type2num1,Type2num2); break; case 7: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 052-%d-%d ",Type2num1,Type2num2); break; case 8: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 031-%d-%d ",Type2num1,Type2num2); break; case 9: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 033-%d-%d ",Type2num1,Type2num2); break; case 10: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 043-%d-%d ",Type2num1,Type2num2); break; case 11: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 041-%d-%d ",Type2num1,Type2num2); break; case 12: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 063-%d-%d ",Type2num1,Type2num2); break; case 13: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 061-%d-%d ",Type2num1,Type2num2); break; case 14: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 054-%d-%d ",Type2num1,Type2num2); break; case 15: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 055-%d-%d ",Type2num1,Type2num2); break; case 16: printf(" Enter the central four-digit : "); scanf("%d",&Type2num1); printf(" Enter the last four digits : "); scanf("%d",&Type2num2); printf(" 064-%d-%d ",Type2num1,Type2num2); break; }while((c=getchar())=='Q');//expected ‘while’ before ‘else’ 오류가 나요 ,,,ㅠㅠ }else{ printf("error"); } return 0; }//expected declaration or statement at end of input오류가 나요 ,,,