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.
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!