Advertisement

C Programming


C programming
A program to calculate the salary of senior officer, office,and officer(cash).With the increase of year their salary will increase.
  #include<conio.h>
  #include<stdio.h>
  #include<math.h>
  void main()
  {
      clrscr();
      int s,x;
     printf("if u r a senior officer press1,officer 2,cash 3:");
      scanf("%d",&s);
      if(s==1)
      {printf("Enter how many years r u working here");
      scanf("%d",&x);
      if(x==1)
      {printf("TK=21000");}
      if(x==2)
      {printf("tk=22000");}
      if(x==3)
      {printf("tk=23000");}
      if(x==4)
      {printf("tk=24000");}
      if(x==5)
      {printf("tk=25000");}}

       if(s==2)
      {printf("Enter how many years r u working here");
      scanf("%d",&x);
      if(x==1)
      {printf("TK=17000");}
      if(x==2)
      {printf("tk=18000");}
      if(x==3)
      {printf("tk=19000");}
      if(x==4)
      {printf("tk=20000");}
      if(x==5)
      {printf("tk=21000");}
                                                     }

      if(s==3)
      {printf("Enter how many years r u working here");
      scanf("%d",&x);
      if(x==1)
      {printf("TK=16000");}
      if(x==2)
      {printf("tk=17000");}
      if(x==3)
      {printf("tk=18000");}
      if(x==4)
      {printf("tk=19000");}
      if(x==5)
      {printf("tk=20000");}
                                                       }



                                                getch();



                                                                                      }


No comments:

Post a Comment

Please comment bellow. Share your knowledge