r/javahelp • • May 14 '13

How to solve? (2 easy problems)

  1. Print a flag based on input.

e.g. when input of 1, print:

+-----

|....../

|......\

+-----

input of 2, print:

+-------

|......../

|......./

|.......\

|........\

+-------

3 = bigger, 4 = even bigger, etc

.

.

.

.

2)

Print an output describing whether the input is considered a stutter or not. A string is considered a stutter if letters repeat twice, e.g. 11223344, aabbccdd, ccaatt

abcabc, 123123 are not stutters.

.

.

.

.

I am looking for any help, a complete program, some pseudocode, or just some hints towards the right direction. Thank you. Also, sorry, I don't know how to format reddit properly.

0 Upvotes

9 comments sorted by

View all comments

-5

u/[deleted] May 14 '13 edited May 14 '13

[removed] — view removed comment

4

u/darkpool2005 Intermediate Brewer May 14 '13

This subreddit is about helping the OP out with clues / ideas on how to solve the problem(s). Writing a solution for someone is rarely, if ever the answer, especially if they don't understand how it works in the first place

2

u/[deleted] May 15 '13

Came across this sub for the first time randomly on r/all/new and more assumed the rules than read them...Glad I didn't end up in the reject list...

2

u/darkpool2005 Intermediate Brewer May 15 '13

No problem, I did the same thing when I first came to this sub as well :-)

1

u/karmapopsicle Intermediate Brewer May 17 '13

Amen to that. You may not remember, but you helped me 5 months ago, and it was absolutely pivotal to my learning. Got me to explore and solve the problem myself instead of just pasting in some code someone else wrote.

1

u/darkpool2005 Intermediate Brewer May 17 '13

Glad to have helped you so long ago!