U E D R , A S I H C RSS

새싹교실/2011/學高/8회차

  • array 화해
  • recursive function ( , 트하 H_n = 2*H_n-1 + 1 .)

#include <stdio.h>

int count=0;

void hanoi(char from,char to,char mid,int num){
 if(num>0){
  // Input your code
  count++;
 }
}

int main(){
 int numOfRings;
 printf(" : ");
 scanf("%d",&numOfRings);
 hanoi('A','C','B',numOfRings);
 printf(" 행회: %d\n",count);
 return 0;
}


  • . num n ; 통해 히 할 ... -
    • ... 헤 . 하 count 형태 . -

:

  • recursive function
  • random()
  • array
    • passing by value(call by value )
    • Memory array
    • index 0
    • declaration

  • . .

:

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:43
Processing time 0.0282 sec