Skip to content

Instantly share code, notes, and snippets.

@vixtory09678
Last active April 5, 2019 16:34
Show Gist options
  • Save vixtory09678/0b34f386602eefb5a9b59a2bbe1c6389 to your computer and use it in GitHub Desktop.
Save vixtory09678/0b34f386602eefb5a9b59a2bbe1c6389 to your computer and use it in GitHub Desktop.
int x = 10;
int y = -23; // สร้างตัวแปรแบบ จำนวนเต็ม
float z = 2.44;
float pi = 3.14; // สร้างตัวแปรแบบ ทศนิยม
char bloodGroup = 'B'; // สร้างตัวแปรแบบ ตัวอักษร ซึ่งจะใส่ตัวอักษรได้แค่ตัวเดียวเท่านั้นภายใต้เครื่องหมาย '' เช่น 'x' , 'b'
bool isDoorOpen = true; // สร้างตัวแปรแบบ boolean หรือ ตรรกะ ซึ่งจะมีค่าแค่ true กับ false หรือ 1 กับ 0 นั่นเอง
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment