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

when will triggars the at new event in abap and web dybn pro?

0 Answers   TCS,


What is procedural oriented language language..? give some examples of this language....?

0 Answers  


Who is the Best SAS/Clinical Trainer in Hyderabad

1 Answers  


iam confused to choose among testing, .net and java can anybody help me????????

0 Answers  


Define distributed queries. can you explain me as soon as possible

0 Answers   HCL,






How to link calculator in oops concept? how is it working in oops concept? why dont u using in beginning of program 'z' in abap(sap)?

2 Answers  


What is the difference b/w Object base and object oriented programming?

1 Answers  


what are the differences between CONS, LIST, and APPEND

0 Answers   Comtech,


Even if all fields are initialized also in a program, I am getting COBOL/400 decimal data error .why is it coming?

1 Answers   Freelance,


In project we have Documentation phase also,in that what is micro and macro designing?

0 Answers  


why should i hire u

16 Answers   Google, Satyam,


needs examples for black box testing and white box testing

1 Answers   CTS, IBM, Wipro,


Categories