Your code does not really calculate primes. A number N is a prime number if it has only 2 divisors (without giving a remainder): 1 and N itself.
To implement a very basic calculation, you have to take the input number N, and dived it in a loop by all numbers from 2 up to N. If N can be divided evenly without a remainder by one of these values, it is not a prime number. If it can not be divided without a remainder it is a prime value.
If you're looking for coding puzzles, there are lots in the "community challenge" section under the "Learn" tab of the home page. This Android app has quite a lot: https://play.google.com/store/apps/details?id=com.alansa.ideabag2I
It is finally done! It now works flawlessly! Please do check it out and let me know if there are any further mistakes to be corrected! Thank you a lot for your feedback! This is what keeps me going and helps a lot!