Advertisement
yoyo106

exit function

Dec 18th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. void exit_phonebook()
  2. {
  3.     char confirm[100];
  4.     char yes[3]="yes";
  5.     char Yes[3]="Yes";
  6.     printf("Are you sure you want to exit? (Yes or No)\n");
  7.     scanf("%s", confirm);
  8.     if (strcmp(confirm,Yes)==0||strcmp(confirm,yes)==0)
  9.         exit(0);
  10.     else
  11.         display_menu();
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement