#include <stdio.h>

unsigned foo( unsigned n );

int main( void )
{
    unsigned n;
    printf( "请输入台阶的级数:" );
    scanf( "%u", &n );
    printf( "走完%u级台阶有%u种走法\n", n, foo(n) );
}

unsigned foo( unsigned n )
{
    if( n == 1 )
        return 1;
    if( n == 2 )
        return 2;
    return foo(n-1) + foo(n-2);
    // 
}