




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















context IntVector::sort() -- assumes that IntVector is -- represented with an OCL sequence post: this@pre->asBag() = this->asBag() and forAll(i : Integer | 1 <= i and i < this->size() and this->at(i) <= this->at(i + 1))
SUM(b[0 .. n] : int ) returns t : int int b[0 : n]; i := 1; t := b[0]; while i <= n do t := t + b[i]; i := i + 1 end ; end ;
k = 0 n