Skip to content

Commit e1c428c

Browse files
author
martin
committed
An example I use for explaining CBMC.
1 parent fe9a429 commit e1c428c

File tree

1 file changed

+18
-0
lines changed
  • main-module/src/main/java/com/diffblue/java_test

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.diffblue.java_test;
2+
3+
public class Search
4+
{
5+
public boolean search(int [] array, int target)
6+
{
7+
boolean found = false;
8+
int i;
9+
10+
for (i = 0 ; i < array.length; ++i) {
11+
if (array[i] == target) {
12+
found = true;
13+
}
14+
}
15+
16+
return found;
17+
}
18+
}

0 commit comments

Comments
 (0)