#include<stdio.h>
#include<conio.h>
#include<string.h>
void main(void)
{ clrscr();
int CustomerMeal=0;
int GrandTotal=0;
int SaleTax;
int SaleTaxAmount;
int TotalCustomer;
int count=0;
char choice;
char sweet[20];
choice='Y';
printf("*** Virtual Resturant ***\n");
while(choice=='Y'||choice=='y')
{
printf("\nEnter the price of meal:");
scanf("%d",&CustomerMeal);
if(CustomerMeal<=1000)
{
SaleTax=0;
SaleTaxAmount=0;
}
else if(CustomerMeal>1000 && CustomerMeal<=2000)
{
SaleTax=1;
SaleTaxAmount=CustomerMeal*SaleTax/100;
}
else
{
SaleTax=2;
SaleTaxAmount=CustomerMeal*SaleTax/100;
}
TotalCustomer=CustomerMeal+(CustomerMeal*SaleTax/100);
if(TotalCustomer<1000)
strcpy(sweet,"Candies");
else if(TotalCustomer>=1000 && TotalCustomer<2000)
strcpy(sweet,"Sweet Bread");
else if(TotalCustomer>=2000 && TotalCustomer<3000)
strcpy(sweet,"Pudding");
else if(TotalCustomer>=3000 && TotalCustomer<4000)
strcpy(sweet,"Cake");
else
strcpy(sweet,"Trifle");
count++;
GrandTotal=GrandTotal+TotalCustomer;
printf("\nPrice of Meal:\t%d",CustomerMeal);
printf("\nSale tax:\t%d",SaleTaxAmount);
printf("\n_______________________________");
printf("\nTotal Amount:\t%d",TotalCustomer);
printf("\nThis customer should be served with %s",sweet);
printf("\nDo you want to process another customer?\n Enter 'Y' for Yes or 'N' to exit>:");
choice=getche();
}
printf("\nGrand Totals:");
printf("\nTotal Customers:\t\t%d",count);
printf("\nTotal Amount for All Bills:\t%d",GrandTotal);
getch();
}
its cs201 idea solution file
--
--
We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish you all the best. Join www.vuaskari.com,
To post to this group, send email to vuaskari_com@googlegroups.com
Visit these groups:
This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
Management: https://groups.google.com/group/vuaskari_mgt?hl=en
Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
MIS Group: http://groups.google.com/group/askari_mis?hl=en
#include<conio.h>
#include<string.h>
void main(void)
{ clrscr();
int CustomerMeal=0;
int GrandTotal=0;
int SaleTax;
int SaleTaxAmount;
int TotalCustomer;
int count=0;
char choice;
char sweet[20];
choice='Y';
printf("*** Virtual Resturant ***\n");
while(choice=='Y'||choice=='y')
{
printf("\nEnter the price of meal:");
scanf("%d",&CustomerMeal);
if(CustomerMeal<=1000)
{
SaleTax=0;
SaleTaxAmount=0;
}
else if(CustomerMeal>1000 && CustomerMeal<=2000)
{
SaleTax=1;
SaleTaxAmount=CustomerMeal*SaleTax/100;
}
else
{
SaleTax=2;
SaleTaxAmount=CustomerMeal*SaleTax/100;
}
TotalCustomer=CustomerMeal+(CustomerMeal*SaleTax/100);
if(TotalCustomer<1000)
strcpy(sweet,"Candies");
else if(TotalCustomer>=1000 && TotalCustomer<2000)
strcpy(sweet,"Sweet Bread");
else if(TotalCustomer>=2000 && TotalCustomer<3000)
strcpy(sweet,"Pudding");
else if(TotalCustomer>=3000 && TotalCustomer<4000)
strcpy(sweet,"Cake");
else
strcpy(sweet,"Trifle");
count++;
GrandTotal=GrandTotal+TotalCustomer;
printf("\nPrice of Meal:\t%d",CustomerMeal);
printf("\nSale tax:\t%d",SaleTaxAmount);
printf("\n_______________________________");
printf("\nTotal Amount:\t%d",TotalCustomer);
printf("\nThis customer should be served with %s",sweet);
printf("\nDo you want to process another customer?\n Enter 'Y' for Yes or 'N' to exit>:");
choice=getche();
}
printf("\nGrand Totals:");
printf("\nTotal Customers:\t\t%d",count);
printf("\nTotal Amount for All Bills:\t%d",GrandTotal);
getch();
}
its cs201 idea solution file
On Thu, Nov 3, 2011 at 1:24 PM, mc110403700 Maria Naz <mc110403700@vu.edu.pk> wrote:
cs201 ka solution koi snd kr dy
On 11/3/11, mc110403318 Jehanzeb <mc110403318@vu.edu.pk> wrote:
> 2 subject mary be hai cs201mth202
>
> On Tue, Nov 1, 2011 at 1:44 PM, mc110401822 Sobia Sakhawat <
> mc110401822@vu.edu.pk> wrote:
>
>> helo
>> plz mjy b koi idea bta dain
>>
>>
>>
>> On Tue, Nov 1, 2011 at 11:20 AM, mc100203407 Fida Hussain Altaf
>> <mc100203407@vu.edu.pk <mc090406330@vu.edu.pk>> wrote:
>>
>>> kindly someone send me the solution of the current assignment of cs
>>>>> 201,301,302,304,401,403,mth202
>>>>>
>>>>> --
>>>>> We say, "Be one as Pakistani Nation and grow up for Pakistan's Future".
>>>>> Wish you all the best. Join www.vuaskari.com,
>>>>> To post to this group, send email to vuaskari_com@googlegroups.com
>>>>> Visit these groups:
>>>>> This (Main) Group:
>>>>> http://groups.google.com/group/vuaskari_com?hl=en?hl=en
>>>>> MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
>>>>> HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
>>>>> Banking Group:
>>>>> http://groups.google.com/group/askari_banking?hl=en?hl=en
>>>>> Management: https://groups.google.com/group/vuaskari_mgt?hl=en
>>>>> Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
>>>>> MIS Group: http://groups.google.com/group/askari_mis?hl=en
>>>>>
>>>>
>>>> --
>>>> We say, "Be one as Pakistani Nation and grow up for Pakistan's Future".
>>>> Wish you all the best. Join www.vuaskari.com,
>>>> To post to this group, send email to vuaskari_com@googlegroups.com
>>>> Visit these groups:
>>>> This (Main) Group:
>>>> http://groups.google.com/group/vuaskari_com?hl=en?hl=en
>>>> MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
>>>> HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
>>>> Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
>>>> Management: https://groups.google.com/group/vuaskari_mgt?hl=en
>>>> Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
>>>> MIS Group: http://groups.google.com/group/askari_mis?hl=en
>>>>
>>>
>>>
>>>
>>> --
>>> Fida Saghar
>>>
>>>
>>> --
>>> We say, "Be one as Pakistani Nation and grow up for Pakistan's Future".
>>> Wish you all the best. Join www.vuaskari.com,
>>> To post to this group, send email to vuaskari_com@googlegroups.com
>>> Visit these groups:
>>> This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
>>> MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
>>> HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
>>> Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
>>> Management: https://groups.google.com/group/vuaskari_mgt?hl=en
>>> Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
>>> MIS Group: http://groups.google.com/group/askari_mis?hl=en
>>>
>>
>> --
>> We say, "Be one as Pakistani Nation and grow up for Pakistan's Future".
>> Wish you all the best. Join www.vuaskari.com,
>> To post to this group, send email to vuaskari_com@googlegroups.com
>> Visit these groups:
>> This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
>> MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
>> HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
>> Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
>> Management: https://groups.google.com/group/vuaskari_mgt?hl=en
>> Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
>> MIS Group: http://groups.google.com/group/askari_mis?hl=en
>>
>
> --
> We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish
> you all the best. Join www.vuaskari.com,
> To post to this group, send email to vuaskari_com@googlegroups.com
> Visit these groups:
> This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
> MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
> HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
> Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
> Management: https://groups.google.com/group/vuaskari_mgt?hl=en
> Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
> MIS Group: http://groups.google.com/group/askari_mis?hl=en
>
--
We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish you all the best. Join www.vuaskari.com,
To post to this group, send email to vuaskari_com@googlegroups.com
Visit these groups:
This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
Management: https://groups.google.com/group/vuaskari_mgt?hl=en
Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
MIS Group: http://groups.google.com/group/askari_mis?hl=en
--
cs301,cs304,cs408,cs610,cs614,cs615,mgt503
--
We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish you all the best. Join www.vuaskari.com,
To post to this group, send email to vuaskari_com@googlegroups.com
Visit these groups:
This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
Management: https://groups.google.com/group/vuaskari_mgt?hl=en
Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
MIS Group: http://groups.google.com/group/askari_mis?hl=en
Comments
Post a Comment