One boy has to climb steps. He can climb 1 or 2 steps at a time.

Write a function that will returns number of way a boy can
climb the steps.

Int WaytoSteps(int n)



(eg:- suppose number of steps is n=4 ,the function will
return 5

(one-one-one-one ,one-one-two, one-two-one-,two-one-one,
two-two)


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Programming Languages AllOther Interview Questions

Why multiple inheritance is removed in java?

4 Answers   TCS,


How to find out the user exit for va01.

1 Answers  


what is web service in java? have u use before.

0 Answers  


Why COBOL/400 is giving 95 session error when opening a file even though the file is having key and the screen or display file is having IND ARA defined?

1 Answers   Freelance,


If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this

0 Answers   SGT,






how can we get version of database ?

1 Answers  


What is the best action a system can take when deadlock is detected

2 Answers  


the systematic access of small computers in a distributed data processing system is referred as?

0 Answers   Mphasis,


swap two number wthout using third variable

4 Answers   eClerx,


How to connect to ms word wit VB ojective is to prepare s/w to generate question paper , selects questions randomly from the ms access , database

0 Answers   Wipro,


what is the difference between a namespace and assembly ?

4 Answers   Innominds, Polaris,


Write a pseudo code to evaluate a number to any base given (2...16) based on the input. Number greater than 9 should be given as A-F for 10-15.

0 Answers   Goldman Sachs,


Categories