Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- void main()
- {
- int num,max=0;
- float priced,prices,tax,count=0,sum=0;
- while (num!=0)
- {
- printf("enter a numbers");
- scanf("%f",&num);
- printf("enter a price");
- scanf("%d",&prices);
- priced=priced*3.8;
- if(prices>max)
- {
- max=prices;
- }
- prices=priced;
- tax=priced*0.17;
- tax=priced+tax;
- tax+=sum;
- count++;
- sum/=count;
- }
- printf("The max price in shekel is:%f,priced");
- printf("The number of bottleis:%d,num");
- printf("Average price of bottle with tax:%f,sum");
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement