•

Check out our Community Blogs

Register and join over 40,000 other developers!

### Recent Blog Entries

• phi

I love this community !

• JackJames

hi i am jack i am seo expert jack james would love you to read new post

# [Homework] Creating a bill in shop for vegetables,pulses,others with some rules

c

This topic has been archived. This means that you cannot reply to this topic.
No replies to this topic

### #1 SaiGanesh

SaiGanesh

CC Lurker

• Just Joined
• 2 posts

Posted 19 December 2015 - 10:14 PM

Generate a bill for Home delivery order from a super market.
Input: For each product (price, weight and type), customer type

Rules:
1. if Bill amount more then \$300, then no delivery charge else delivery charge is applicable as below.
- \$10 delivery charge for 0-2KG
- \$15 delivery charge for 2-4KG
- \$20 delivery charge for >4KG
2. if Bill amount more then \$500, then 15% discount provided on total bill.
3. In final bill before tax provide below discount.
- new registered member customer - 35% discount (maximum discount value of \$22)
- exsisting member customer - 11% discount (maximum discount value of \$11)
4. No discount applicable on vegitables.
5. tax are applicable as below rules:
- vegitable : 2%
- pulses : 3%
- process food: 8%
- others: 5%

```#include<stdio.h>
#include<string.h>
#include<conio.h>
struct product
{
float price,weight;
char type[10];
};
void main()
{
struct product t1[20];
int j;
clrscr();
for(j=0;j<=3;j++)
{
printf("enter the type :");
scanf("%s",&t1[j].type);
printf("enter the weight: ");
scanf("%f",&t1[j].weight);
printf("enter the price: ");
scanf("%f",&t1[j].price);
printf("type is :%s\n\n",t1[j].type);
printf("weight is : %f\n\n",t1[j].weight);
printf("price is : %f\n\n",t1[j].price);
}
getch();
}

```

After this what to do i am not getting . let me know i am learner