Problems to develop logic
Hi, im a learner in java, and i dont know much. The main things I know are all the different kinds of loops, switch statement, overloaded constructors/methods. arrays(just started), strings, stringbuffers, InputStreamReader and BufferedReader.
I want to know if there are some simple problems that will help me to generally develop the logic required for programming, or any kind of problems which can be solved with the help of what I know. Some examples of the kinds of questions i do are:
1. Write a program to display the following pattern (Patterns)
Input : 5
15
25
35
45
55
The above is one of the simpler patterns ive done
2.Reverse A String
Input : This is a sentence
Output : sentence a is This
3.Word Count
Input :" Bla thisa bla "
Output: 4
4.Make a program to check whether the number entered is a prime, perfect
or special number
Perfect number is a number equal to the sum of all its divisors besides the number itself
e.g 6=1+2+3 28=1+4+7+14
Special number is equal to the sum of the factorials(factorial 4=1x2x3x4, 5=1x2x3x4x5) of its digits
e.g 145=1! + 4! + 5!
5.Pattern
Input 5
Output :
123454321
1234 4321
123321
1221
11
If anyone has some of these problems or knows a good source for them, please post here

