source: CIVL/examples/arithmetic/division.cvl@ 97cfc53

1.23 2.0 main test-branch
Last change on this file since 97cfc53 was 95a2a9e, checked in by Tim Zirkel <zirkeltk@…>, 13 years ago

Added new examples.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@169 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 185 bytes
RevLine 
[95a2a9e]1#include<assert.h>
2
3$input int N;
4$input int a[N];
5
6void main() {
7 double x = 0.0;
8 double s;
9
10 $assume N >= 2 && N <= 4;
11 x = x + a[0]+a[1];
12 s = x/N;
13 $assert N*s==a[0]+a[1];
14}
Note: See TracBrowser for help on using the repository browser.