-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnestedif.c
More file actions
60 lines (55 loc) · 1.17 KB
/
nestedif.c
File metadata and controls
60 lines (55 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* =====================================================================================
*
* Filename: nestedif.c
*
* Description: :
*
* Version: 1.0
* Created: 20-Oct-21 13:08:05
* Revision: none
* Compiler: gcc
*
* Author: Jwtiyar Nariman (), jwtiyar@gmail.com
* Organization:
*
* =====================================================================================
*/
#include <stdlib.h>
#include <stdio.h>
int main ()
{
printf("Add a patient\n");
printf("Viewing a aptient\n");
printf("Searching a patient\n");
printf("Exiting\n");
int input;
scanf("%d",&input);
if(input ==1)
{
printf("Adding patieny\n");
} else if (input == 2) {
printf("View a patient\n");
} else if (input ==3 ) {
printf("search patient\n");
} else if (input == 4) {
printf("Exitimng...\n");
printf("Do you want to save? \n");
char q;
getchar();
scanf("%c",&q);
if (q == 'Y' || q == 'y')
{
printf("Saving changes\n");
} else if (q == 'N' || q == 'n')
{
printf("Fine whatever!");
} else {
printf("Haxing detected self destructing :)\n");
}
} else
{
printf("Incorrect input\n");
}
return 0;
}