Science, asked by donajijoy753, 1 year ago

Gst calculator for basic items software c programming

Answers

Answered by writersparadise
2
Calculating GST for any item involves dividing the GST into CGST and SGST. GST is calculated as the percentage of the total price of the purchase. Therefore, GST can be calculated using a C-program as given below.

 

Add Item

View Inventory

Create Invoice

Press any other key to exit

Enter choice: 1

Enter name: Apple

Enter price: 10

Enter GST rate: 5

 

Name        Price       GST Rate

--------------------------------------------------------

Apple       10.00       5

Banana      15.00       12

Mango       20.00       18

--------------------------------------------------------

Add Item

View Inventory

Create Invoice

Press any other key to exit

--------------------------------------------------------

Enter choice: 3

Add item to invoice

Print Invoice

Press any other key to go back

Enter choice: 1

Enter tax type ('i' for intrastate; 'o' for interstate): i

1 : Apple

2 : Banana

3 : Mango

Choose item: 1

Enter quantity: 10

Name        Price Qty   Rate  CGST  SGST  IGST  Total

1.  Apple       10.00 10    100.00      2.50  2.50  0.00  105.00

2.  Mango       20.00 5     100.00      9.00  9.00  0.00  118.00

#include <stdio.h>

#include <stdlib.h> //Replace with conio.h in Windows

#define MAX_INVENTORY 100

#define MAX_INVOICE 10

#define MAX_NAME_LEN 20

struct inventory_item {

char name[MAX_NAME_LEN];

float price;

int gst_rate;

};

struct invoice_item {

int inventory_id;

int quantity;

char tax_type;

};

Similar questions