#!/bin/csh -f
#!/bin/csh -xvf
#fibonacci, done using recursion
if ( $1 < 0 ) then
    exit 0
else if ( $1 == 0 ) then
    exit 0
else if ( $1 == 1 ) then
    exit 1
else if ( $1 > 1 ) then
    @ nm1 = $1 - 1
    $0 $nm1
    set f1 = $status
    @ nm2 = $1 - 2
    $0 $nm2
    set f2 = $status
    @ f = $f1 + $f2
#    echo $f1 $f2 $f
    echo $f
    exit $f
endif
