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.0109 sec