Skip to content

Instantly share code, notes, and snippets.

@hocarm
Last active May 1, 2018 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hocarm/9026e3f4a22c09310686ab4b6893786a to your computer and use it in GitHub Desktop.
Save hocarm/9026e3f4a22c09310686ab4b6893786a to your computer and use it in GitHub Desktop.
void main(void){
long x,y,z; // 3 biến x y z là local variables
x=1; y=2; // set giá trị của x và y
z = x+4*y; // tính z
x++; // Tăng x, cái này giống x=x+1;
y--; // Tương tự giảm y, giống y=y-1;
x = y<<2; // Dịch trái, tương tự x=4*y;
z = y>>2; // Dịch phải, tương tự x=y/4;
y += 2; // Tăng y, tương tự y=y+2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment