2 커밋 03b9178f72 ... 170815ea4f

작성자 SHA1 메시지 날짜
  Hacker GNU 170815ea4f 3 operator 2 년 전
  Hacker GNU 8add938cb9 C Puzzle started 2 년 전
4개의 변경된 파일36개의 추가작업 그리고 0개의 파일을 삭제
  1. BIN
      src/cpuzzle/operator2
  2. 15 0
      src/cpuzzle/operator2.c
  3. BIN
      src/cpuzzle/operator3
  4. 21 0
      src/cpuzzle/operator3.c

BIN
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;
+}

BIN
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);
+
+}
+