fork download
  1. #include<stdio.h>
  2.  
  3. #define IC 60
  4. #define TAX_PERCENTAGE 7.5
  5.  
  6. int main()
  7. {
  8.  
  9. float tax_decimal = TAX_PERCENTAGE / 100;
  10. float ST = IC * tax_decimal;
  11. float total = IC + ST;
  12. printf("Price = %d\nTax = %f\nTotal = %f\n\n", IC, ST, total);
  13.  
  14. }
Success #stdin #stdout 0s 5456KB
stdin
Standard input is empty
stdout
Price = 60
Tax = 4.500000
Total = 64.500000