-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.c
167 lines (101 loc) · 2.71 KB
/
app.c
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#include <stdio.h>
int main(){
//Headding
printf("\n\n\t -------------------------------------------------\n");
printf("---------- SRI LANKA TELECOME PHONE NUMBER LOCATION FINDER ----------\n");
printf("\t ------------------------------------------------- \n\n");
//Input first three digits of phone number
int num;
printf("Enter first three digits in number :");
scanf("%d",&num);
//Check the area codes
switch(num){
case 63:
printf("\nThis number is located in \"AMPARA\".\n\n");
break;
case 25:
printf("\nThis number is located in \"ANURADHAPURA\".\n\n");
break;
case 36:
printf("\nThis number is located in \"AWISSAWELLA\".\n\n");
break;
case 55:
printf("\nThis number is located in \"BADULLA\".\n\n");
break;
case 57:
printf("\nThis number is located in \"BANDARAWELA\".\n\n");
break;
case 65:
printf("\nThis number is located in \"BATTICALOA\".\n\n");
break;
case 32:
printf("\nThis number is located in \"CHILAW\".\n\n");
break;
case 11:
printf("\nThis number is located in \"COLOMBO\".\n\n");
break;
case 91:
printf("\nThis number is located in \"GALLE\".\n\n");
break;
case 33:
printf("\nThis number is located in \"GAMPAHA\".\n\n");
break;
case 47:
printf("\nThis number is located in \"HAMBANTHOTA\".\n\n");
break;
case 51:
printf("\nThis number is located in \"HATTON\".\n\n");
break;
case 21:
printf("\nThis number is located in \"JAFFNA\".\n\n");
break;
case 67:
printf("\nThis number is located in \"KALMUNAI\".\n\n");
break;
case 34:
printf("\nThis number is located in \"KALUTARA\".\n\n");
break;
case 81:
printf("\nThis number is located in \"KANDY\".\n\n");
break;
case 35:
printf("\nThis number is located in \"KAGELLA\".\n\n");
break;
case 37:
printf("\nThis number is located in \"KURUNEGALA\".\n\n");
break;
case 23:
printf("\nThis number is located in \"MANNAR\".\n\n");
break;
case 66:
printf("\nThis number is located in \"MATALE\".\n\n");
break;
case 54:
printf("\nThis number is located in \"NAWALAPITIYA\".\n\n");
break;
case 31:
printf("\nThis number is located in \"NEGAMBO\".\n\n");
break;
case 52:
printf("\nThis number is located in \"NUWARA ELIYA\".\n\n");
break;
case 38:
printf("\nThis number is located in \"PANADURA\".\n\n");
break;
case 27:
printf("\nThis number is located in \"POLONNARUWA\".\n\n");
break;
case 45:
printf("\nThis number is located in \"RATHNAPURA\".\n\n");
break;
case 26:
printf("\nThis number is located in \"TRINCOMALEE\".\n\n");
break;
case 24:
printf("\nThis number is located in \"VAVUNIYA\".\n\n");
break;
default:
printf("\nYou entered invalid sri lankan phone number..!!\n\n");
}
return 0;
}