Assuming we need to find i such that
1 ≤ i ≤ n and t[i]=i.
If we need to find only the first occurrence, we can do:
for i:1 to n {
if t[i]=i then return(i)
}
If exhaustive search is required, then put the results (values of i) in an array or a linked list, return the number of values found, and the array (or linked list).
First let’s express the total number of marbles as such:
y(yellow marbles) + r(red marbles)=23; y+r=23
now let’s express the relation of yellow marbles to red marbles:
y=2r(2 times red marbles) - 4(4 less marbles); y=2r-4
since we figured out what y equals, we can plug into the first equation we created:
(2r-4)+r=23
now solve for r:
2r-4+r=23
combine like terms
3r-4=23
add 4 to both sides
3r=27
divide both side by 3
r=9
plug r back into first equation and solve for y:
y+9=23
subtract 9
y=14
there are 9 red marbles and 14 yellow marbles!
Is this a multiple choice question? If so...what are the options?
Well $25 is the standard price initially.
$10 is added every hour as a constant rate.
Therefore a. 25 + 10h is the right expression
Answer: 2.73 x 10 the the power of 2
Step-by-step explanation: