Last active
April 5, 2019 16:34
-
-
Save vixtory09678/0b34f386602eefb5a9b59a2bbe1c6389 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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