int main(int argc,char *argv[])
{
char ch
while(true)
{
printf("*************************************\n")
printf(" 1.Reader Priority\n")
printf(" 2.Writer Priority\n")
printf(" 3.Exit to Windows\n")
printf("*************************************\n")
printf("Enter your choice(1,2,3): ")
do{
ch=(char)_getch()
}while(ch!= 1 &&ch!= 2 &&ch!= 3 )
system("cls")
if(ch== 3 )
return 0
else if(ch== 1 )
ReaderPriority("thread.dat")
else
WriterPriority("thread.dat")
printf("\nPress Any Key to Coutinue:")
_getch()
system("cls")
}
return 0
標簽:
char
int
printf
while
上傳時間:
2017-01-06
上傳用戶:gonuiln