Tuesday, September 14, 2010

hwo to write program for Employment salary service in c-programing ?

#include
#include

void main()
{

/* id=employee id,b_sal=employee basic salary,hra=basic*0.30%,
da=basic*0.50%,ta=hra+da*0.50%,other=500,pf=(basic+hra)*5%,pt=(basic+hra)*2% */

int id;
int hra,da,ta,others,pf,pt;
int net_sal,sal;
clrscr();
printf("\n\t Enter the Employee id\t:\t");
scanf("%d",&id);
printf("\n\t Enter the Basic salary\t:\t");
scanf("%d",&sal);
hra=sal*0.30/100;
da=sal*0.30/100;
ta=da+hra*0.50/100;
others=500;
pf=(sal+hra)*5/100;
pt=(sal+hra)*2/100;
net_sal=(sal+hra+da+ta+others)-(pf+pt);
printf("\n\t Net salary=%d",net_sal);
getch();
}

hwo to write program for Arithmetic Opreatoer in c-programing ?

#include
#include
void main()
{
int a, b, c, d, e, f, g;
clrscr();
printf("\n\t Enter any number\t\t:\t");
scanf("%d",&a);
printf ("\n\t Enter any number\t\t:\t");
scanf("%d",&b);
c=a+b;
printf ("\n\n\t The Adition is\t\t\t:\t%d",c);
d=a-b;
printf ("\n\n\t The subtraction is\t\t:\t%d",d);
e=a*b;
printf ("\n\n\t The Mtiplication is\t\t:\t%d", e);
f=a/b;
printf ("\n\n\t The Dision is\t\t:\t%d",f);
g=a%b;
printf ("\n\n\t The modulus is\t\t\t:\t%d",g);
getch();
}

how to write a program of Relational Opretore by give the value of user in C-programing ?

its use  to large in any two number hwz one number is larges by give the user


#include
#include
void main()

{
int a,b,c;
clrscr();
printf("\n\t Enter Any Number \t\t:\t");
scanf("%d",&a);
printf ("\n\t Enter any number \t\t:\t");
scanf ("%d",&b);
c= a>b?a:b;
printf ("\n\tThe largest of two numbers is\t:\t%d",larger);
getch();

}

how to write a program of Arithmetic Opretore by give the value of user in C-programing ?

int a;
clrscr();
printf("\n\t Enter the Value of A\t:\t");
scanf("%d",&a);

printf("\n\n\t Value of A is\t:\t%d",a);
printf ("\n\n\t Value of A is\t:\t%d",++a);
printf ("\n\n\t Value of A is\t:\t%d",a++);
printf ("\n\n\t Value of A is\t:\t%d",a);
printf ("\n\n\t Value of A is\t:\t%d",--a);
printf ("\n\n\t Value of A is\t:\t%d",a--);
printf ("\n\n\t Value of A is\t:\t%d",a);
getch();
}

how to write a program of Arithmetic Opretore in C-programing ?

#include
#include

void main()

{
int a=10;
clrscr();
printf("\n\n\t Value of A is\t:\t%d",a);
printf ("\n\n\t Value of A is\t:\t%d",++a);
printf ("\n\n\t Value of A is\t:\t%d",a++);
printf ("\n\n\t Value of A is\t:\t%d",a);
printf ("\n\n\t Value of A is\t:\t%d",--a);
printf ("\n\n\t Value of A is\t:\t%d",a--);
printf ("\n\n\t Value of A is\t:\t%d",a);
getch();
}