|
void main()
{
float price = 525.75;
float sales_tax = 0.06;
printf("The item cost is %f\n", price);
float result;
result=price * sales_tax;
printf("Sales tax on the item is %f\n",result );
}
The item cost is 525.750000
Sales tax on the item is 31.545000
void main()
{
float price = 525.75;
float sales_tax = 0.06;
printf("The item cost is %f\n", price);
float result;
printf("Sales tax on the item is %f\n",price * sales_tax );
}
The item cost is 525.750000
Sales tax on the item is 31.544999 |
|