Advertisement
DrAungWinHtut

c_gold_price

Jul 7th, 2021
651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.70 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<conio.h>
  3. void main(void)
  4. {
  5.     float total_gold_price;
  6.     float gold_price_per_kyat;
  7.     float kyat;
  8.     float pae;
  9.     float yway;
  10.     float gold_weight;
  11.  
  12.     printf("Please enter gold price per kyat : ");
  13.     scanf_s("%f", &gold_price_per_kyat);
  14.     printf("Please enter kyat : ");
  15.     scanf_s("%f", &kyat);
  16.     printf("Please enter pae : ");
  17.     scanf_s("%f", &pae);
  18.     printf("Please enter yway : ");
  19.     scanf_s("%f", &yway);
  20.     gold_weight= kyat + (pae/16) + yway /(16*8);
  21.     total_gold_price = gold_price_per_kyat * gold_weight;
  22.      printf("total gold weight is %f ", gold_weight);
  23.  
  24.     printf("total gold price is %f ", total_gold_price);
  25.     _getch;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement