File: test02.ci

package info (click to toggle)
clif 0.90.2-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 4,336 kB
  • ctags: 2,815
  • sloc: ansic: 29,914; yacc: 4,338; lex: 644; makefile: 373; 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;