Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void add_element();
- void edit_info();
- void print_all_patient();
- void get_reference();
- void get_info_about_indeb();
- int main() {
- char list[6][50] = {"New patient", "Edit info about patient", "Print all patient", "Get reference", "Get info about indebtedness", "Exit"};
- int count_items_of_menu = 6;
- printf("Choose number of action\n");
- while(1) {
- system("clear");
- for (int i = 0; i < count_items_of_menu; i++) {
- printf("%d - %s\n", i + 1, list[i]);
- }
- int act;
- scanf("%d", &act);
- switch (act) {
- case 1:
- add_element();
- break;
- case 2:
- edit_info();
- break;
- case 3:
- print_all_patient();
- break;
- case 4:
- get_reference();
- break;
- case 5:
- get_info_about_indeb();
- break;
- case 6:
- return 0;
- break;
- }
- }
- }
- void is_not_available(){
- printf("No info, plz wait some more, the service is not available\n");
- printf("Enter the number for exit\n");
- int tmp;
- scanf("%d", &tmp);
- }
- void add_element(){
- is_not_available();
- };
- void edit_info(){
- is_not_available();
- };
- void print_all_patient(){
- is_not_available();
- }
- void get_reference(){
- is_not_available();
- }
- void get_info_about_indeb(){
- is_not_available();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement