You should probably slow down, make sure no trains are coming (and listen for any train sounds!) before proceeding to cross and go about your way :)
<u>When a programmer declare single dimension or double dimensions array they use box bracket with index number to access the cell number.</u>
int a[10]; = where a is variable name declared with data type as integer and which hold 10 values.
Each is access with cell number or index number surrounded by box brackets
Example a [4] where “a” is variable number and “4” is index number or cell number. By refer “4” user is access the 4 cell data
Maximum “a” single dimension store total of 10 number where cell number or index number starts from 0 to 9.
- # Algorithm to find the number of integers greater than 10 in a list
- list = read(list of integers)
- n = len(list)
- count = 0
- For i = 1 to n
- If list[i] > 10:
- count = count + 1
- Endif
- End
- Return count
<h3>
Explanation:</h3>
Then the length of the list is stored in a variable n. A variable count to store the number of integers more significant than 10 is initialized to 0.
- Then, a for-loop is used to iterate over the list. A for-loop is used in this case because every element of the inventory needs to be checked for a value greater than 10.
- In each iteration of the for-loop, the value at the index of the list is checked. If the value is greater than 10, then the counter variable count is incremented by 1.
- The iterations continue till the for-loop ends. At this point, the variable count will be the number of integers greater than 10.
- Note that in case the list does not have any number greater than 10, then the count variable will be 0.
To learn more about it, refer
to brainly.com/question/25311149
#SPJ4