Project

General

Profile

sumth31.c

Sepideh Asadi, 22/05/2018 19:26

 
1
 int func(int a, int b)
2
  {
3
    int m = -1;
4
    for (int i = 0; i < 10; i++)
5
    {
6
      m = m + (a + b * a);
7
    }
8
    return (m % 2);
9
  }
10

    
11
int main()
12
  {
13
    unsigned int a = nondet();
14
    unsigned int b = nondet();
15
    int c = a;
16
    int d = b;
17
    int p = func(a, b);
18
    assert (p >= -1);
19
    int q = func(c, d);
20
    assert(p == q);
21
    assert((p >> 1) >= 0);
22
    return 0;
23
  }