Sunday, October 3, 2010

write a programing to accept the cost of Qty to the user and print with Tex ?


#include
#include
void main()
{

float cost,tax,luxury,total;
clrscr();
luxury=0.0;
printf("\n\tEnter the cost of the item\t:\t");
scanf("%f", &cost);
tax=cost*0.06;
if(cost>40000.0)
luxury=cost*0.005;
total=cost+tax+luxury;
printf("\n\t the total cost is \t\t:\t%0.2f",total);
getch();

}

No comments: