background image

else if(key>oldkey)   

 

printf("%c Go up!...stop in %c floor.",24,key);   

else   

printf("%c Go down!...stop in %c floor.",25,key);   

oldkey=key;   

break;   

case '3':   

if(key==oldkey)   

printf(" %c ok you are here",22);   

else if(key>oldkey)   

 

printf("%c Go up!...stop in %c floor.",24,key);   

else   

printf("%c Go down!...stop in %c floor.",25,key);   

oldkey=key;   

break;   

case '4':   

if(key==oldkey)   

printf(" %c ok you are here",22);   

else if(key>oldkey)   

 

printf("%c Go up!...stop in %c floor.",24,key);   

else   

printf("%c Go down!...stop in %c floor.",25,key);   

oldkey=key;   

break;   

case '5':   

if(key==oldkey)   

printf(" %c ok you are here",22);   

else if(key>oldkey)   

 

printf("%c Go up!...stop in %c floor.",24,key);   

else   

printf("%c Go down!...stop in %c floor.",25,key);   

oldkey=key;   

break;   

case '6':   

if(key==oldkey)   

printf(" %c ok you are here",22);   

else if(key>oldkey)