# bOt cOde - Round 2

 Tweet
10 replies [Last post]
bOtskOOl
Offline
Last seen: 9 years 49 weeks ago
Joined: 2009-02-21
bOt Points: 3500

These are the problems for round 2

The last date and time for submission is

30 June 2009

12 : 00  midnight

All submissions have to be mailed to

Posting solutions in the forum can lead to immediate disqualification.

shubham
Offline
Last seen: 7 years 30 weeks ago
Joined: 2009-05-28
bOt Points: 134
Question1

PROBLEM 1- Points (50-80)

Precision upto any number of places.

Declare two variables a and b of type int. Assign positive values to 'a' as well 'b' such that
a<b. Write a program which prints the correct value of a/b upto 60 decimal places. For
example,

for a=1, b=8, the output should be
0.125

for a=1, b=1231, the output should be
0.000812347684809098294069861900

8935824532900081234768480909821

shubham
Offline
Last seen: 7 years 30 weeks ago
Joined: 2009-05-28
bOt Points: 134
Question2

Problem 2- Ponits(50-80)

There is a single number representation for any date in this century : For example,
20081125 corresponds to 25 November 2008, and 20890612 corresponds to 12 June 2089. In this convention, the last two digits represent the day of the month, the next two digits represent the month, and the remaining number represents year. In this convention, it can be seen that 20082410 is not a valid date since 24 is not a valid month number. In a similar way, 20080231 is not a valid date since February does not have 31 days. Write a program in which you declare a variable date of suitable data type. Assign it some positive number. If it represents a valid date based on the above convention, the program should print the date on the screen, otherwise it should print the suitable message about invalidity of the
date.
Examples :
if date = 20081211, the output should be : 11 December 2008.
if date = 20080229, the output should be : 29 February 2008.
if date = 20890631, the output should be : June can’t have 31 days.
if date = 20101331, the output should be : 13 is invalid month.

shubham
Offline
Last seen: 7 years 30 weeks ago
Joined: 2009-05-28
bOt Points: 134
Question3

There is a ladder consisting of n horizontal bars, each pair of consecutive bars are

separated by a distance of 1 feet. A person is standing at the bottom of the ladder.

He/She  may either climb 1 bar, 2 bar or 3 bars in a single step. Print all ways of

reaching the top of the ladder. You should also return the total number of ways of

climbing the ladder. The value of n is provided from command line. For example, if

n = 4, the answer should be:

There are total 7 ways :
-1-1-1-1
-1-1-2
-1-2-1
-1-3
-2-1-1
-2-2
-3-1

nitesh
Offline
Last seen: 9 years 29 weeks ago
Joined: 2009-03-26
bOt Points: 370
@ravinder

Seems like you havent been through the rules

You have to mail your attempts to

shubham
Offline
Last seen: 7 years 30 weeks ago
Joined: 2009-05-28
bOt Points: 134

@ravinder

you should read the rules befor posting anything.

It is clearly mentioned that one should mail the solutions.

You have been temporarily banned from Round-2

@ everyone

Please mail the codes and not post here.

ravinder singh
Offline
Last seen: 10 years 35 weeks ago
Joined: 2009-06-11
bOt Points: 124

its happening from the first day,everybody posting answers here itself and last time i also  posted the answers here.at that time no body had the  problem.

bOtskOOl
Offline
Last seen: 9 years 49 weeks ago
Joined: 2009-02-21
bOt Points: 3500

Dear ravinder singh,

Thank you

sunny
Offline
Last seen: 10 years 5 hours ago
Joined: 2009-06-23
bOt Points: 58
solution..............

pl tell me where cn i apply sir  ........... i hv tried a solution.......

bOtskOOl
Offline
Last seen: 9 years 49 weeks ago
Joined: 2009-02-21
bOt Points: 3500
Re: solution..............

Kindly mail your solution to [email protected]

shubham
Offline
Last seen: 7 years 30 weeks ago
Joined: 2009-05-28
bOt Points: 134
bOtcOde Round -2 finishes

bOtcOde Round -2 finishes here.

Thanks to all those who attempted n congrats to all those who have cracked the bOtcOde.

All those who have cracked will recieve a mail containing the information of points n a short discussion n suggestion.

Thanks

We will be back with Round-3 shortly.

Happy coding