"justify"> _ getch () ;;
} {( nВведіте ПІБ: ); (stdin); (pv- gt; fio);
} while (pars_fio (pv- gt; fio)); {( nВведіте рік народження: ); (stdin); (% i , amp; pv- gt ; birthdayyear);
} while (pars_year (pv- gt; birthdayyear)); ( nВведіте адреса: ); (stdin); (pv- gt; adress); ( nВведіте мета прибуття: ); (stdin); (pv- gt; target); _ hash_element (hashtable, pv, hashkey); ( nРегістрація завершена. );
_ getch () ;;
} (choice == 2)
{( cls ); {( nВведіте № паспорта: ); (stdin); (% s , amp; pass);
} while (pars_passport (pass)); (check_reg (pbegin, pass))
{( nНельзя видалити заселеного постояльця );
_ getch () ;;
}=hash (pass); _ hash_element (hashtable, pass, hashkey);
_ getch () ;;
} (choice == 3)
{( cls ); ( Список постояльців: n ); _ hash_elements (hashtable);
_ getch () ;;
} (choice == 4)
{( cls ); ( Очищення даних про постояльців ); (strcmp (pbegin- gt; passport, ffff-ffffff )!=0)
{( Nбаз зареєстрованих постояльців не порожня! nОчістка даних про постояльців неможлива! );
_ getch () ;;
} _ hash_table (hashtable); ( nok );
_ getch () ;;
} (choice == 5)
{( cls ); {( nВведіте № паспорта для пошуку: ); (stdin); (% s , amp; pass);
} while (pars_passport (pass)); _ hash_table (hashtable, pass, pbegin);
_ getch () ;;
} (choice == 6)
{fio [100]; ( cls ); {( nВведіте ПІБ для пошуку: ); (stdin); (fio);
} while (pars_fio (fio)); _ hash_table (hashtable, fio);
_ getch () ;;
} (choice == 7)
{
{( nВведіте № готельного номераnl-люксnp-полюлюксno-одноместныйnm-многоместныйn: gt; ); (stdin); (% s raquo ;, amp; Number);
} while (pars_number (Number)); (* Number == o )//якщо вибраний одномісний номер, то кількість кімнат і місць дорівнює 1 за замовчуванням=CountBads=1;
{
{(stdin); ( nВведіте кількість місць: ); (% s , amp; tmp);
} while (pars_num (tmp));=atoi (tmp);
{(stdin); ( nВведіте кількість кімнат: ); (% s , amp; tmp);
} while (pars_num (tmp));=atoi (tmp);
}
{(stdin); ( nНалічіе санвузли (y/n): ); (% s , amp; tmp);
} while (pars_bool (tmp));=tmp [0]; (stdin); ( nОборудованіе: ); (equipment); (stdin);=Binary_Tree (Number, CountBads, CountRooms, toilet, equipment, Tree, amp; H) ;;
} (choice == 8)
{( cls ); {( nВведіте номер готельного номера для видалення (без типу): ); (stdin); (% s raquo ;, amp; tmp );
} while (pars_num (tmp)); (find_number (pbegin, tmp))
{( nНельзя видалити номер, коли в ньому зареєстрований (и) постоялець (и) );
_ getch () ;;
}=atoi (tmp);=0;=Delete_Element (Tree, Number2, amp; H, amp; status); (status == 1) ( n Запис видалено n );
_ getch () ;;
} (choice == 9)
{( cls ); ( nІнформація про готельних номерах: n ); (! Tree)
{( Nбаз порожня! );
_ getch () ;;
} (Tree);
_ getch (); ( cls ) ;;
} (choice == 10)
{( cls ); (strcmp (pbegin- gt; passport, ffff-ffffff )!=0)
{( nНельзя очистити базу номерів, колив них зареєстровані постояльці );
_ getch () ;;
} ( amp; Tree);
//Tree=NULL; (Tree); ( nОчістка бази завершено n );
_ getch (); ( cls ) ;;
} (choice == 11)
{( cls ); {( nВведіте № готельного номера: ); (stdin); (Number);
} while (pars_number (Number));=0; ( Інформація про номер: ); _ hotel_room (Tree, Number, pbegin, hashtable, amp; status); (! status) (: інформація не знайдена );
_ getch () ;;
} (choice == 12)
{( cls ); ( Введіть необхідне обладнання: ); (stdin...