Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #define TYPE_MAX 50
- #define PHONE_NUMBERS 3
- #define MANUY_NUM 200
- typedef struct
- {
- char city[TYPE_MAX];
- char street[TYPE_MAX];
- int houseNum;
- }Address;
- typedef struct
- {
- char areaCode[TYPE_MAX];
- char phone[TYPE_MAX];
- }Phone;
- typedef Phone allPhone[PHONE_NUMBERS];
- typedef struct
- {
- char manuyName[TYPE_MAX];
- Address manuyAddress;
- allPhone manuyPhones;
- }Manuy;
- typedef struct
- {
- int manuy_count;
- Manuy allManuy[MANUY_NUM];
- }Phone_book;
- void main()
- {
- Manuy m;
- int i, choice;
- printf("Welcome to the phone book.\n\n");
- printf("For adding a manuy to the book - press 1.\n");
- printf("For locating an existing manuy - press 2.\n");
- printf("For deleting an existing manuy - press 3.\n");
- printf("For sorting all the manuyim in an ascending order by name - press 4.\n");
- scanf("%d", &choice);
- switch (choice)
- {
- case 1:
- {
- add_manuy(&m);
- }
- }
- }
- void add_manuy(Manuy *pt)
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement