2 Komitmen 03b9178f72 ... 170815ea4f

Pembuat SHA1 Pesan Tanggal
  Hacker GNU 170815ea4f 3 operator 2 tahun lalu
  Hacker GNU 8add938cb9 C Puzzle started 2 tahun lalu
4 mengubah file dengan 36 tambahan dan 0 penghapusan
  1. TEMPAT SAMPAH
      src/cpuzzle/operator2
  2. 15 0
      src/cpuzzle/operator2.c
  3. TEMPAT SAMPAH
      src/cpuzzle/operator3
  4. 21 0
      src/cpuzzle/operator3.c

TEMPAT SAMPAH
src/cpuzzle/operator2


+ 15 - 0
src/cpuzzle/operator2.c

@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+#define PRINTX printf("x=%d ", x)
+#define PRINTY printf("y=%d ", y)
+#define PRINTZ printf("z=%d\n", z)
+
+int main()
+{
+int x=2, y=0, z=0;
+PRINTX;
+x*=3+2; PRINTX; PRINTY; PRINTZ;
+x*=y=z=4; PRINTX; PRINTY; PRINTZ;
+x=y==z; PRINTX; PRINTY; PRINTZ;
+//x==(y=z); PRINTX;
+}

TEMPAT SAMPAH
src/cpuzzle/operator3


+ 21 - 0
src/cpuzzle/operator3.c

@@ -0,0 +1,21 @@
+#include <stdio.h>
+
+#define PRINT(int) printf("%d\n", int)
+
+
+int main()
+	{
+	int x, y, z;
+
+	x=2; y=1; z=0;
+	
+	x=x&&y||z; PRINT(x);
+	PRINT(x||!y&&z);
+
+	x=y=1;
+	x=x++ -1; PRINT(x); PRINT(z);
+	z+=-x++ + ++y; PRINT(x); PRINT(z);
+	z=x/++x; PRINT(z);
+
+}
+