Earn by twitter on twivert

Sign up for PayPal and start accepting credit card payments instantly.

Monday, September 13, 2010

WAP ot calculate salary of an employee


/*WAP ot calculate salary of an employee */
#include<stdio.h>
#include<conio.h>
main( )
{
 char   g ;
 int   yos, qual, sal ;

 printf ( "Enter Gender, Years of Service and 
   Qualifications ( 0 = G, 1 = PG ):" ) ;
 scanf ( "%c%d%d", &g, &yos, &qual ) ;

 if ( g == 'm' && yos >= 10 && qual == 1 )
  sal = 15000 ;
 else if ( ( g == 'm' && yos >= 10 && qual == 0 ) || 
  ( g == 'm' && yos < 10 && qual == 1 ) )
  sal = 10000 ;
 else if ( g == 'm' && yos < 10 && qual == 0 )
  sal = 7000 ;
 else if ( g == 'f' && yos >= 10 && qual == 1 )
  sal = 12000 ;
 else if ( g == 'f' && yos >= 10 && qual == 0 )
  sal = 9000 ;
 else if ( g == 'f' && yos < 10 && qual == 1 )
  sal = 10000 ; 
 else if ( g == 'f' && yos < 10 && qual == 0 )
  sal = 6000 ;

 printf ( "\nSalary of Employee = %d", sal ) ;
 getch();
}

No comments:

Post a Comment

ADS

How to earn online

How to earn online:
Step - 1 :
signup for PayPal, to recieve your online earning
click here:
https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL
step - 2 : Singup these 4 sites & earn & enjoy! Read site to know how to earn.
1. trekpay
Earn up to $0.02 (2 cents) per click.
http://www.trekpay.com/?ref=34690
2. neobux
Earn up to $0.02 (2 cents) per click.
Click here:
http://www.neobux.com/?r=Moneyearner786

AddMe

Bookmark and Share