Franck's answer is better (using ~), but I just wanted to point out that the conditional in yours is slightly redundant. It's easy to forget that, since you already have a boolean value, you don't need to perform a comparison in your conditional. So you could have just done this...
<span>if x
x = false;
else
x = true;
<span>end</span></span>
$1.10 per pound for the 1-pound bag.
$0.96 per pound for the 2-pound bag.
$0.92 per pound for the 3-pound bag.
As the quantity of sugar increases, the unit cost decreases.
Answer:
15 seconds
Step-by-step explanation:
If you make a table of values for the dog and the squirrel using d = rt, then the rates are easy: the dog's rate is 150 and the squirrel's is 100. The t is what we are looking for, so that's our unknown, and the distance is a bit tricky, but let's look at what we know: the dog is 200 feet behind the squirrel, so when the dog catches up to the squirrel, he has run some distance d plus the 200 feet to catch up. Since we don't know what d is, we will just call it d! Now it seems as though we have 2 unknowns which is a problem. However, if we solve both equations (the one for the dog and the one for the squirrel) for t, we can set them equal to each other. Here's the dog's equation:
d = rt
d+200 = 150t
And the squirrel's:
d = 100t
If we solve both for t and set them equal to each other we have:

Now we can cross multiply to solve for d:
150d = 100d + 20,000 and
50d = 20,000
d = 400
But we're not looking for the distance the squirrel traveled before the dog caught it, we are looking for how long it took. So sub that d value back into one of the equations we have solved for t and do the math:

That's 1/4 of a minute which is 15 seconds.
Answer:
The answer is 360 ways
Step-by-step explanation:
The function of x is equal to 7 dollars times the number of hours the cashier works. This function would look something like this:
F(x) = 7x
Hope this helps! :)