short project in c language

Sales Tax Caculator


#include<stdio.h>

#define servicetax_rate 4;
float tax_calc();
float taxxcalc();

float main()
{
int choice;
float amount;
double abc,abcd;
a:
clrscr();
printf("\t\t\tWelcome to tax calculator\n\n");
printf(" 1. Calculate the amount at default rate\n\n");
printf(" 2. Calculate the amount on your rate\n\n ");
printf("3. Exit\n\n");
printf("Enter your choice\nYour choice is >>");
scanf("%d",&choice);
switch(choice)
{
case 1 :   abc=tax_calc();
  printf("\n\nTotal amount with tax is %f\n",abc);
  getch();
  goto a;
  break;
case 2 :   abcd=taxxcalc();
  printf("\n\nTotal amount with tax is %f\n",abcd);
  getch();
  goto a;
  break;
case 3 :   exit();
default:
  printf("Enter correct choice");
}
getch();
return 0;
}


float taxxcalc()
{
float taxrate;
float amount;
double taxamnt, totamnt;
printf("\n\nEnter the tax rate-");
scanf("%f",&taxrate);
printf("\nEnter the amount-");
scanf("%f",&amount);
taxamnt=amount*.01*taxrate;
printf("\n\nYour tax is %f",taxamnt);
totamnt=amount+taxamnt;
return totamnt;
}


float tax_calc()
{
float amount;
double taxamnt,totamnt;
printf("\n\nEnter the amount-$");
scanf("%f",&amount);

taxamnt=amount*.01*servicetax_rate;
printf("\nTax is %f",taxamnt );
totamnt=amount+taxamnt;

return totamnt;
}



1) INTRODUCTION

The purpose of the project is to calculate the sales tax imposed during the purchasing of the commodity. The project thus calculates the sales tax automatically. It does almost every work which is related to sales tax and billing. “Sales tax Calculator” is developed as per seeing the increasing requirement to speed up the work and incorporate a new work culture. Thus,  a new software has been proposed to reduce manual work, improving work efficiency, saving time and to provide greater flexibility and user-friendliness as the system previously followed was totally manual one with lots of errors.


2) OBJECTIVE
The main objective while implementing the sales tax calculator is to calculate the sales tax on particular amount and to find out the total bill which the consumer has to pay.

3) Project Description

To describe the process description of the project , it contains several steps which  are as follows:

·        We include the header files.

·        We declare the function made.

·        We define the function main of int return type.

·        We declare the variables used in main.

·        We call the above declared function.

·        Now control goes to function .

·        Accepts the amount and calculates the tax.

·        Finally , return the value.

4) Limitations

Every project whether large or small has some limitations no matter however diligently developed. In some cases limitations is small while in other cases they may be broad also. The new system has got some limitations. Major areas where modifications can be done are as follows:

Ø There are no loops so only once the user can use.

Ø The security is limited so some additional arrangement could be made to provide more security to the system.

Ø There are no functions with arguments specifically defined in this module.

5) Conclusion

This project gives an overview of the sales tax Calculator.
After entering into the project, user is left with several options via –
a)    The user have to enter his or her purchasing amount .
b)    The user can view the tax on that amount and also the     total amount.

It is a computerized system, which can be used very easily & effectively by the administrators of the sale tax calculator.


Post a Comment

0 Comments