Advertisement
Guest User

Untitled

a guest
Apr 9th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.70 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. void dha()
  4. {
  5. int a,b;
  6. printf("\t\t\t\t\tChoose Hospital Type: \n\n\t\t\t\t\t1.Govt.Hospital\n\t\t\t\t\t2.Privet Hospital\n\n");
  7. printf("\t\t\t\t\t");
  8. scanf("%d",&a);
  9. system("cls");
  10. if(a==1){
  11. printf("\t\t\t\t\t1.DHAKA MEDICAL COLLEGE HOSPITAL,DHAKA\n\n \t\t\t\t\tLocation : DHAKA- 1100,Bangladesh\n \t\t\t\t\tPhone : 02 55165001\n \t\t\t\t\tFax : 02 55165006\n \t\t\t\t\tEmail : principal@dmc.gov.bd, dmc_principal@yahoo.com\n");
  12. printf("");
  13. }
  14. printf("\n\n\t\t\t\t\tpress 1 for continue\n\t\t\t\t\tenter -1 for exit\n\t\t\t\t\t");
  15.  
  16. scanf("%d",&b);
  17. if(b==1)user();
  18. if(b==-1)define();
  19. }
  20.  
  21. void raj()
  22. {
  23. int a,b;
  24. printf("\t\t\t\t\tChoose Hospital Type: \n\n\t\t\t\t\t1.Govt.Hospital\n\t\t\t\t\t2.Privet Hospital\n\n");
  25. printf("\t\t\t\t\t");
  26. scanf("%d",&a);
  27. if(a==1)
  28. {
  29. printf("\t\t\t\t\tRAJSHAHI MEDICAL COLLEGE HOSPITAL,RAJSHAHI\n\n\t\t\t\t\tLocation : Medical College Road, Laxmipur Rajpara, Rajshahi-6100\n\t\t\t\t\tTel : 0721-772150\n\t\t\t\t\tFax : 0721-772174\n\t\t\t\t\tEmail : principalrajshahi@yahoo.com\n\t\t\t\t\tFacebook : facebook.com/rmc\n\t\t\t\t\tTwitter : twitter.com/rmc\n");
  30. }
  31. printf("\n\n\t\t\t\t\tpress 1 for continue\n\t\t\t\t\tenter -1 for exit\n\t\t\t\t\t");
  32.  
  33. scanf("%d",&b);
  34. if(b==1)user();
  35. if(b==-1)define();
  36. }
  37.  
  38. void rang()
  39. {
  40. int a;
  41. printf("\t\t\t\t\tChoose Hospital Type: \n\n\t\t\t\t\t1.Govt.Hospital\n\t\t\t\t\t2.Privet Hospital\n\n");
  42. scanf("%d",&a);
  43. }
  44.  
  45. void mymn()
  46. {
  47. int a;
  48. printf("\t\t\t\t\tChoose Hospital Type: \n\n\t\t\t\t\t1.Govt.Hospital\n\t\t\t\t\t2.Privet Hospital\n\n");
  49. scanf("%d",&a);
  50. }
  51.  
  52. void syl()
  53. {
  54. int a;
  55. printf("\t\t\t\t\tChoose Hospital Type: \n\n\t\t\t\t\t1.Govt.Hospital\n\t\t\t\t\t2.Privet Hospital\n\n");
  56. scanf("%d",&a);
  57. }
  58.  
  59. void khu()
  60. {
  61. int a,b;
  62. printf("\t\t\t\t\tChoose Hospital Type: \n\n\t\t\t\t\t1.Govt.Hospital\n\t\t\t\t\t2.Privet Hospital\n\n");
  63. printf("\t\t\t\t\t");
  64. scanf("%d",&a);
  65. system("cls");
  66. if(a==1)
  67. {
  68. printf("\n\n\t\t\t\t\t1.Khulna Medical College\n\n\t\t\t\t\tLocation: Boyra Main Road, Khulna.\n\t\t\t\t\ttel: +88-041-760350\n\t\t\t\t\tEmail: kmc@ac.dghs.gov.bd, kmc.khulna@gmail.com\n\n\n");
  69. printf("\t\t\t\t\t2.Khulna Sadar Hospital\n\n\t\t\t\t\tLocation : Khulna Sadar, Khulna.\n\t\t\t\t\tPhone : 041-723876 723433\n\n");
  70. }
  71. else if(a==2)
  72. {
  73.  
  74. }
  75. printf("\n\n\t\t\t\t\tpress 1 for continue\n\t\t\t\t\tenter -1 for exit\n\t\t\t\t\t");
  76.  
  77. scanf("%d",&b);
  78. if(b==1)user();
  79. if(b==-1)define();
  80. }
  81.  
  82. void bar()
  83. {
  84. int a,b;
  85. printf("\t\t\t\t\tChoose Hospital Type: \n\n\t\t\t\t\t1.Govt.Hospital\n\t\t\t\t\t2.Privet Hospital\n\n");
  86. printf("\t\t\t\t\t");
  87. scanf("%d",&a);
  88. if(a==1)
  89. {
  90. printf("\t\t\t\t\tSHER-E-BANGLA MEDICAL COLLEGE HOSPITAL,BARISHAL\n\n\t\t\t\t\tLocation : South Alekanda, Band Road, Barisal (8200), Bangladesh.\n\t\t\t\t\tOrg Code : 10001978\n\t\t\t\t\tTel : 0431-2173547\n\t\t\t\t\tFax : 880-0431-61607\n\t\t\t\t\tMobile : 01721329779,01750836883\n\t\t\t\t\tEmail : sbmc@ac.dghs.gov.bd\n");
  91. }
  92. printf("\n\n\t\t\t\t\tpress 1 for continue\n\t\t\t\t\tenter -1 for exit\n\t\t\t\t\t");
  93.  
  94. scanf("%d",&b);
  95. if(b==1)user();
  96. if(b==-1)define();
  97.  
  98. }
  99.  
  100. void chi()
  101. {
  102. int a,b;
  103. printf("\t\t\t\t\tChoose Hospital Type: \n\n\t\t\t\t\t1.Govt.Hospital\n\t\t\t\t\t2.Privet Hospital\n\n");
  104. printf("\t\t\t\t\t");
  105. scanf("%d",&a);
  106. if(a==1)
  107. {
  108. printf("\n\n\t\t\t\t\tCHITTAGONG MEDICAL COLLEGE HOSPITAL\n\n \t\t\t\t\tLOCATION: 57, K.B. FAZLUL KADER ROAD,P.O- CHAWKBAZAR.CHITTAGONG, BANGLADESH.\n \t\t\t\t\tPABX: 031-616891-94\n \t\t\t\t\tINFORMATION:031-630335\n \t\t\t\t\tDirector Office: 031-630179\n \t\t\t\t\tFAX: 031-610022\n \t\t\t\t\tEmergency: 031-619761\n \t\t\t\t\tEmail : cmch@hospi.dghs.gov.bd\n");
  109. }
  110. scanf("%d",&b);
  111. if(b==1)user();
  112. if(b==-1)define();
  113.  
  114. }
  115. void define()
  116. {
  117. int who,user_id=123456,pass=1357,a,b;
  118. printf("\n\n\t\t\t\t\tWho are you?\n\n\t\t\t\t\tPress 0 for user\n\t\t\t\t\tPress 1 for admin\n");
  119. printf("\t\t\t\t\t");
  120. scanf("%d",&who);
  121. system("cls");
  122. if(who==0)
  123. {
  124. user();
  125. }
  126. else if(who==1)
  127. {
  128. printf("\t\t\t\t\tEnter User ID:");
  129. scanf("%d",&a);
  130. printf("\n\n\t\t\t\t\tEnter User Password:");
  131. scanf("%d",&b);
  132. if(a==user_id&&b==pass)
  133. {
  134. admin();
  135. }
  136. else
  137. {
  138. printf("\n\n\t\t\t\t\tWrong User ID or Password\n\n");
  139. define();
  140. }
  141.  
  142. }
  143.  
  144. }
  145. void user()
  146. {
  147. int a,i;
  148. printf("\n\n\t\t\t\t\tPress corresponding number to choose division: \n\n\t\t\t\t\t1.Dhaka\n\t\t\t\t\t2.Rajshahi\n\t\t\t\t\t3.Chittagong\n\t\t\t\t\t4.Khulna\n\t\t\t\t\t5.Barishal\n\t\t\t\t\t6.Rangpur\n\t\t\t\t\t7.Mymenshing\n\t\t\t\t\t8.Sylhet\n\n");
  149. for(i=0;; i++)
  150. {
  151. printf("\t\t\t\t\t");
  152. scanf("%d",&a);
  153. system("cls");
  154. if(a==1)
  155. {
  156. dha();
  157. }
  158. else if(a==2)
  159. {
  160. raj();
  161. }
  162. else if(a==3)
  163. {
  164. chi();
  165. }
  166. else if(a==4)
  167. {
  168. khu();
  169. }
  170. else if(a==5)
  171. {
  172. bar();
  173. }
  174. else if(a==6)
  175. {
  176. rang();
  177. }
  178. else if(a==7)
  179. {
  180. mymn();
  181. }
  182. else if(a==8)
  183. {
  184. syl();
  185. }
  186. else if(a==-1)
  187. {
  188. define();
  189. }
  190. }
  191. }
  192.  
  193. void admin()
  194. {
  195. int a,i;
  196. printf("\n\n\t\t\t\t\tPress corresponding number to choose your task: \n\n\t\t\t\t\t1.Insert Hospital Information.\n\t\t\t\t\t2.Delete Hospital Information.\n\n");
  197.  
  198. for(i=0;; i++)
  199. {
  200. printf("\t\t\t\t\t");
  201. scanf("%d",&a);
  202. if(a==1)
  203. {
  204. Insert();
  205.  
  206. }
  207. else if(a==2)
  208. {
  209. Delete();
  210. }
  211. else if(a==-1)
  212. {
  213. define();
  214. }
  215. }
  216. }
  217. void Insert()
  218. {
  219. printf("\t\t\t\t\tInsertion not yet ready\n\t\t\t\t\tComing Soon!!!\n\n\t\t\t\t\tFor exit from admin section enter -1\n\n");
  220.  
  221. }
  222.  
  223. void Delete()
  224. {
  225. printf("\t\t\t\t\tDeletion Not yet ready\n\t\t\t\t\tComing Soon!!!\n\n");
  226. }
  227.  
  228. int main()
  229. {
  230. int con;
  231. printf("\n\n\n\t\t\t\t\tBANGLADESH HOSPITAL INFORMATION\n\n");
  232. printf("\n\n\t\t\t\t\tPress 1 for continue: ");
  233. scanf("%d",&con);
  234. system("cls");
  235. if(con==1)
  236. {
  237. define();
  238. }
  239.  
  240. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement