summaryrefslogtreecommitdiff
path: root/05/tcc-0.9.27/tests/tests2/33_ternary_op.c
diff options
context:
space:
mode:
Diffstat (limited to '05/tcc-0.9.27/tests/tests2/33_ternary_op.c')
-rw-r--r--05/tcc-0.9.27/tests/tests2/33_ternary_op.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/05/tcc-0.9.27/tests/tests2/33_ternary_op.c b/05/tcc-0.9.27/tests/tests2/33_ternary_op.c
new file mode 100644
index 0000000..8579b50
--- /dev/null
+++ b/05/tcc-0.9.27/tests/tests2/33_ternary_op.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+int main()
+{
+ int Count;
+
+ for (Count = 0; Count < 10; Count++)
+ {
+ printf("%d\n", (Count < 5) ? (Count*Count) : (Count * 3));
+ }
+
+ return 0;
+}
+
+/* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/