You are on page 1of 4

#include <stdio.

h>

#include <stdlib.h>

#include <math.h>

#define PI 3.14159

/* price for one box of gloves */

int main(int argc, char *argv[]) {

char item [100];

int partno;

float cost,costpercarton,discount,profit,newprice;

printf("nEnter Enter Name of item: ");

scanf("%[GLOVES]",item);

printf("nEnter Part Number: ");

scanf("%d" , &partno);

printf("\nEnter Cost: ");

scanf("%f", &cost);

printf("\nEnter Costpercarton: ");

scanf("%f", &costpercarton);

printf("\nEnter discount: ");

scanf("%f", &discount);

printf("\nEnter Profit: ");

scanf("%f", &profit);

newprice = (cost*costpercarton-discount+profit)*1.06;

printf("\n item :%s\n PartNo: %d\n Cost:


RM%f\n",item,partno,cost,costpercarton,discount,profit);

printf("New price with GST is RM%f\n", newprice);

return 0;

You might also like