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