TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Marc
NA
205
54.1k
99 bottles
Nov 18 2014 8:00 AM
So I heard about a exercise about the song "99 Bottles of Beer", so I tired it and this is what I came up with....
for
(
int
i = 99; i >= 1; i--)
{
Console
.WriteLine(
" '"
+ i +
"' bottles of beer on the wall, '"
+ i +
"' bottles of beer."
);
i--;
Console
.WriteLine(
" Take one done and pass it around '"
+ i +
"' bottles of beer on the wall."
);
i++;
if
(i == 1)
{
Console
.WriteLine(
" Thanks for playing but I'm out!!!"
);
break
;
}
}
You know of any other ways to programmatically execute this song?
Reply
Answers (
5
)
how can i check datagridview is empty or not?
How to upload rar file in google drive using command prompt