fork download
  1. #include <stdio.h>
  2.  
  3. int func(int n) {
  4. if(n%2==0) n+=1;
  5. if(!0) return 0;
  6. printf("%d ", n);
  7. return (func(n-2)+n);
  8. }
  9.  
  10. int main(void)
  11. {
  12. /*
  13.   int arr[5]={1,2,3,5,7};
  14.   int *p=arr+2;
  15.   printf("%d", *(++p));
  16.   printf("%d", *++p);
  17. */
  18. /*
  19. int result=func(10);
  20. printf("%d", result);
  21. */
  22. /*
  23. int j, sum=0;
  24. for(j=1; j<=70; j+=5) sum+=1;
  25. printf("%d", sum);
  26. */
  27. /*
  28. int i=100;
  29. int *p=&i;
  30. int **q=&p;
  31. *p=200;
  32. **q=300;
  33. printf("%d %d %d", i, *p, **q);
  34. */
  35. /*
  36. int a[2][3]={{1,2,3},{4,5,6}};
  37. int *b[]={a[0], a[1]};
  38. int *p=b[1];
  39. printf("%d, %d, %d", *b[1], *(p--), *(p---2));
  40. */
  41. /*
  42. char *pc=(char*)10000;
  43. int *pi=(int*)10000;
  44. double *pd=(double*)10000;
  45. pc++, pi++, pd++;
  46. printf("%d, %d, %d", pc, pi, pd);
  47.  
  48. */
  49.  
  50. int a=2;
  51. int b=a*(1/2);
  52. printf("%d, %d", a, b);
  53. return 0;
  54.  
  55. }
Success #stdin #stdout 0s 5544KB
stdin
Standard input is empty
stdout
2, 0