MUstar

IoT C언어 0425 - 도전실전2

Apr 25th, 2017
33
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. int rec_func(int n);
  3.  
  4. int main(void)
  5. {
  6.     rec_func(10);
  7.     return 0;
  8. }
  9.  
  10. int rec_func(int n)
  11. {
  12.     int a,b=0;
  13.     for (a=1;a<=n;a++){b+=a;}
  14.     printf("%d\n",b);
  15. }
RAW Paste Data