A..5 課題5

prog5.jl

function prog5(m)
  #a=zeros(BigInt, m+1) # a0=a[1],...,a_100=a[101]
  a=Array{BigInt}(undef,m+1);
  a[1] = BigInt(1) # a0
  a[2] = BigInt(1) # a1
  for n=1:m-1
    a[n+2] = a[n+1]+a[n];
  end
  for n=1:m
    println("a_$n=$(a[n+1]), a_$n/a_$(n-1)=$(a[n+1]/a[n])")
  end
  println("How about using setprecision(binray_digits)")
end



桂田 祐史