Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include<stdio.h>
  2. void main()
  3. {
  4.     int num,max=0;
  5.     float priced,prices,tax,count=0,sum=0;
  6.     while (num!=0)
  7.     {
  8.     printf("enter a numbers");
  9.     scanf("%f",&num);
  10.     printf("enter a price");
  11.     scanf("%d",&prices);
  12.     priced=priced*3.8;
  13.     if(prices>max)
  14.     {
  15.         max=prices;
  16.     }
  17.         prices=priced;
  18.     tax=priced*0.17;
  19.     tax=priced+tax;
  20.     tax+=sum;
  21.     count++;
  22.     sum/=count;
  23.     }
  24.     printf("The max price in shekel is:%f,priced");
  25.     printf("The number of bottleis:%d,num");
  26.     printf("Average price of bottle with tax:%f,sum");
  27.     system("pause");
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement