Suppose u must climb a flight of n>0 stairs. How many different ways can u climb the stairs if u cimb one or two steps up at a time? For ex, if u are climbing n=4 stairs then u could go 1,1,1,1or 1,1,2 or 1,2,1 or 2,1,1 or 2,2; so there are five ways to climb the stairs. Write a function ways to calculate the number of ways. Proto type is int ways (int n); n is the number of stairs; the returning value should be the number of different ways climbing the stairs.
이거 답지가 없어서 그런데 답이어떻게되는거죠?