SamASU101
Tuesday, September 28, 2010
IsSorted
1. int totalnumbers = number.length -1
2. int output = 0
3. while (totalnumbers >0)
if number[n] <= number[n+1] then output = 1
totalnumbers++
4. if (output = 1)
print "Yes, it is Sorted"
else print "No, it is not sorted"
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment