fork download
  1. #include <stdio.h>
  2.  
  3. int x;
  4. void mondai1(int b)
  5. {
  6. x=b;
  7. }
  8. void mondai2(void){
  9. static int c=10;
  10. x=c;
  11. c++;
  12. }
  13. int mondai3(int d){
  14. x++;
  15. d++;
  16. return d;
  17. }
  18.  
  19.  
  20. int main(void)
  21. {
  22. printf("%d\n", x);
  23. x=101;
  24. printf("%d\n", x);
  25.  
  26. mondai1(102);
  27. printf("%d\n", x);
  28.  
  29. mondai2();
  30. mondai2();
  31. mondai2();
  32. printf("%d\n", x);
  33.  
  34. for(int i=103;i<104;i++){
  35. int x=i;
  36. printf("%d\n", x);
  37. x=mondai3(i);
  38. printf("%d\n", x);
  39. }
  40. printf("%d", x);
  41. return 0;
  42. }
  43.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
0
101
102
12
103
104
13