x < - 0s <- 0
while (x < n)
X <- x + 1
s < s + 2*x - 1}
return s
Prove that s = x² is an invariant of the loop. (c) Java offers functionality for creating arrays of floating point numbers, which have the type float []. The length of such an array is specified as an int variable.
Consider the set of all possible arrays of type float []. Is the cardinality of this set finite, countable, or uncountable? Discuss the relationship of this set to the sets of lists and streams of numbers that we defined.
Fig: 1
Fig: 2
Fig: 3
Fig: 4
Fig: 5
Fig: 6
Fig: 7
Fig: 8