diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-06-30 19:52:59 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-06-30 19:52:59 +0100 |
commit | f8ff27915f8c4d5fb6f31ec2a0a73f65cf604c43 (patch) | |
tree | e1186fac9de9c83ba0d0d0bc43bb9ac0fe86ef26 /test/array.c | |
parent | f26f3887d0b0ac286c317a5425a3a4781871cfc2 (diff) | |
download | vericert-kvx-f8ff27915f8c4d5fb6f31ec2a0a73f65cf604c43.tar.gz vericert-kvx-f8ff27915f8c4d5fb6f31ec2a0a73f65cf604c43.zip |
Add htl pretty printing
Diffstat (limited to 'test/array.c')
-rw-r--r-- | test/array.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/array.c b/test/array.c index e33d47b..7d78a61 100644 --- a/test/array.c +++ b/test/array.c @@ -1,4 +1,7 @@ int main() { - int x[5] = {1, 2, 3, 4, 5}; - return x[2]; + int x[3] = {1, 2, 3}; + int sum = 0, incr = 1; + for (int i = 0; i < 3; i=i+incr) + sum += x[i]; + return sum; } |