File: test02.ci

package info (click to toggle)
clif 0.93-9
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 4,228 kB
  • ctags: 3,284
  • sloc: ansic: 31,464; yacc: 5,067; lex: 819; makefile: 383; sh: 48
file content (35 lines) | stat: -rw-r--r-- 564 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* program testujuci vnaranie cyklov */

int x, y;
y = 1;
for (x = 1; x < 15; ++x)
{
  printf ("teraz som v tele cyklu for %d\n", x);
  while (x > 5 && x < 10)
    {
      printf ("teraz som v tele cyklu while %d\n", x);
      if (x == 9)
	{
	  printf ("teraz som v tele prvej podmienky %d\n", x);
	  break;
	}
      if (x == 8)
	{
	  printf ("teraz som v tele druhej podmienky %d\n", x);
	  break;
	}
      x = x + y;
      printf ("%d\n", x);
    }
  if (x == 14)
    {
      printf ("teraz som v tele tretej podmienky %d\n", x);
      break;
    }
}
exit;