Answer:
You will need to implement a for loop ( I am assuming this is java)
Explanation:
int count20s = 0;
for(int x =0; x< customerAges.length;x++){
if(20 <= customerAges[x] && customerAges[x] <= 29){
count20s++;
}
Answer:
A = 5 + 1.75r
Explanation:
Amount you have = $5
Earning per roll of wrapping paper = $1.75
Let
r = number of rolls of wrapping paper
A = Total amount earned
A = 5 + 1.75r
Equation that represents the total amount A (in dollars) you have after selling r rolls of wrapping paper is
A = 5 + 1.75r
Answer: 1 time.
Explanation:
- A binary function is also known as a half-interval search is a search algorithm to find the position of a given element x within a well-sorted array [].
- Binary search compares the target value to the middle element of the array.
- It ignores half of the elements just after one comparison.
- it compares x with the middle element.
So, the function read an element <u>one time</u> in the array before finding the value.