Advertisement
Guest User

project

a guest
Apr 2nd, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 6.35 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.     if(a==1){
  10.     printf("\t\t\t\t\tDHAKA 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");
  11.     }
  12.     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");
  13.  
  14.     scanf("%d",&b);
  15.     if(b==1)user();
  16.     if(b==-1)define();
  17. }
  18.  
  19. void raj()
  20. {
  21.     int a,b;
  22.     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");
  23.     printf("\t\t\t\t\t");
  24.     scanf("%d",&a);
  25.     if(a==1)
  26.     {
  27.         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");
  28.     }
  29.     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");
  30.  
  31.     scanf("%d",&b);
  32.     if(b==1)user();
  33.     if(b==-1)define();
  34. }
  35.  
  36. void rang()
  37. {
  38.     int a;
  39.     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");
  40.     scanf("%d",&a);
  41. }
  42.  
  43. void mymn()
  44. {
  45.     int a;
  46.     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");
  47.     scanf("%d",&a);
  48. }
  49.  
  50. void syl()
  51. {
  52.     int a;
  53.     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");
  54.     scanf("%d",&a);
  55. }
  56.  
  57. void khu()
  58. {
  59.     int a,b;
  60.     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");
  61.     scanf("%d",&a);
  62.     if(a==1)
  63.     {
  64.         printf("\n\n\t\t\t\t\t Khulna Medical College\n\nLocation: Boyra Main Road, Khulna.\n\t\t\t\t\ttel: +88-041-760350\n\t\t\t\t\t email: kmc@ac.dghs.gov.bd, kmc.khulna@gmail.com\n");
  65.     }
  66.     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");
  67.  
  68.     scanf("%d",&b);
  69.     if(b==1)user();
  70.     if(b==-1)define();
  71. }
  72.  
  73. void bar()
  74. {
  75.     int a,b;
  76.     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");
  77.     printf("\t\t\t\t\t");
  78.     scanf("%d",&a);
  79.     if(a==1)
  80.     {
  81.         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");
  82.     }
  83.     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");
  84.  
  85.     scanf("%d",&b);
  86.     if(b==1)user();
  87.     if(b==-1)define();
  88.  
  89. }
  90.  
  91. void chi()
  92. {
  93.     int a,b;
  94.     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");
  95.     printf("\t\t\t\t\t");
  96.     scanf("%d",&a);
  97.     if(a==1)
  98.     {
  99.         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");
  100.     }
  101.     scanf("%d",&b);
  102.     if(b==1)user();
  103.     if(b==-1)define();
  104.  
  105. }
  106. void define()
  107. {
  108.     int who,user_id=123456,pass=1357,a,b;
  109.     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");
  110.     printf("\t\t\t\t\t");
  111.     scanf("%d",&who);
  112.     if(who==0)
  113.     {
  114.         user();
  115.     }
  116.     else if(who==1)
  117.     {
  118.         printf("\t\t\t\t\tEnter User ID:");
  119.         scanf("%d",&a);
  120.         printf("\n\n\t\t\t\t\tEnter User Password:");
  121.         scanf("%d",&b);
  122.         if(a==user_id&&b==pass)
  123.         {
  124.             admin();
  125.         }
  126.         else
  127.         {
  128.             printf("\n\n\t\t\t\t\tWrong User ID or Password\n\n");
  129.             define();
  130.         }
  131.  
  132.     }
  133.  
  134. }
  135. void user()
  136. {
  137.     int a,i;
  138.     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");
  139.     for(i=0;; i++)
  140.     {
  141.         printf("\t\t\t\t\t");
  142.         scanf("%d",&a);
  143.         if(a==1)
  144.         {
  145.             dha();
  146.         }
  147.         else if(a==2)
  148.         {
  149.             raj();
  150.         }
  151.         else if(a==3)
  152.         {
  153.             chi();
  154.         }
  155.         else if(a==4)
  156.         {
  157.             khu();
  158.         }
  159.         else if(a==5)
  160.         {
  161.             bar();
  162.         }
  163.         else if(a==6)
  164.         {
  165.             rang();
  166.         }
  167.         else if(a==7)
  168.         {
  169.             mymn();
  170.         }
  171.         else if(a==8)
  172.         {
  173.             syl();
  174.         }
  175.         else if(a==-1)
  176.         {
  177.             define();
  178.         }
  179.     }
  180. }
  181.  
  182. void admin()
  183. {
  184.     int a,i;
  185.     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");
  186.  
  187.     for(i=0;; i++)
  188.     {
  189.         printf("\t\t\t\t\t");
  190.         scanf("%d",&a);
  191.         if(a==1)
  192.         {
  193.             Insert();
  194.  
  195.         }
  196.         else if(a==2)
  197.         {
  198.             Delete();
  199.         }
  200.         else if(a==-1)
  201.         {
  202.             define();
  203.         }
  204.     }
  205. }
  206. void Insert()
  207. {
  208.     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");
  209.  
  210. }
  211.  
  212. void Delete()
  213. {
  214.     printf("\t\t\t\t\tDeletion Not yet ready\n\t\t\t\t\tComing Soon!!!\n\n");
  215. }
  216.  
  217. int main()
  218. {
  219.     int con;
  220.     printf("\n\n\n\t\t\t\t\tBANGLADESH HOSPITAL INFORMATION\n\n");
  221.     printf("\n\n\t\t\t\t\tPress 1 for continue: ");
  222.     scanf("%d",&con);
  223.     if(con==1)
  224.     {
  225.         define();
  226.     }
  227.  
  228. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement