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).
Answer:
16 red and 20 blue
Step-by-step explanation:
If you look at the picture there is 16 red
So add 16+64=80 then 80+20=100
16 red
20 blue
64 yellow
Well well we find the area of the triangle first:
area = 1/2 * base * height
area = 1/2 * 8 1/4 * 5 3/4
area = 1/2 * 33/4 * 23/4
area = 1/2 * 759/16
area = 759 / 32
area = 23 23/32
now if we multiply the length of the triangles we get volume because the volume of the prism is really just the sum of the areas of all the triangles that make up it's length. So:
volume = 23 23/32 * 12
volume = 276 276/32
276/ 32 = 8 5/8
volume = 284 5/8