fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main()
  5. {
  6. /* variable definition*/
  7. float price,salestax,setprice;
  8. /* Enter price in dollars */
  9. printf("Price is $100.50 \n");
  10. price = 100.50;
  11. scanf("%f", &price);
  12. /* Enter sales tax */
  13. printf("Sales Tax is 4 percent \n");
  14. salestax = .04;
  15. scanf("%f", &salestax);
  16. /* Enter set price */
  17. printf("Price with tax is \n");
  18. setprice = price + (price * salestax);
  19. scanf("%f", setprice);
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
Price is $100.50 
Sales Tax is 4 percent 
Price with tax is