Advertisement
evgenko

Untitled

Apr 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.54 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void add_element();
  5. void edit_info();
  6. void print_all_patient();
  7. void get_reference();
  8. void get_info_about_indeb();
  9. int main() {
  10.     char list[6][50] = {"New patient", "Edit info about patient", "Print all patient", "Get reference", "Get info about indebtedness", "Exit"};
  11.     int count_items_of_menu = 6;
  12.     printf("Choose number of action\n");
  13.     while(1) {
  14.         system("clear");
  15.         for (int i = 0; i < count_items_of_menu; i++) {
  16.             printf("%d - %s\n", i + 1, list[i]);
  17.         }
  18.         int act;
  19.         scanf("%d", &act);
  20.         switch (act) {
  21.             case 1:
  22.                 add_element();
  23.                 break;
  24.             case 2:
  25.                 edit_info();
  26.                 break;
  27.             case 3:
  28.                 print_all_patient();
  29.                 break;
  30.             case 4:
  31.                 get_reference();
  32.                 break;
  33.             case 5:
  34.                 get_info_about_indeb();
  35.                 break;
  36.             case 6:
  37.                 return 0;
  38.                 break;
  39.         }
  40.     }
  41. }
  42.  
  43. void is_not_available(){
  44.     printf("No info, plz wait some more, the service is not available\n");
  45.     printf("Enter the number for exit\n");
  46.     int tmp;
  47.     scanf("%d", &tmp);
  48. }
  49. void add_element(){
  50.    is_not_available();
  51. };
  52.  
  53. void edit_info(){
  54.     is_not_available();
  55. };
  56.  
  57. void print_all_patient(){
  58.     is_not_available();
  59. }
  60.  
  61. void get_reference(){
  62.     is_not_available();
  63. }
  64.  
  65. void get_info_about_indeb(){
  66.     is_not_available();
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement