kk258966

3/12 C++ 練習四

Mar 12th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main(void)
  4. {
  5.  
  6. int i=5,j=10,a,b;
  7. int x=5,y=10,c,d;
  8.  
  9. a=1+ i++;     //運算元先進行其他運用,再進行加一的動作
  10. printf("a=%d\n",a);
  11.  
  12. c=1+ ++x;     //運算元先進行加一的動作,再進行其他運用
  13.  
  14. b=1+ j--;
  15. printf("b=%d\n",b);
  16. d=1+--y;
  17. printf("d=%d\n",d);
  18.     system("pause");
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment