Printing prime numbers

/* Task: create a function that determines prime number and use it to print out prime numbers from 0-50: */

EDIT
task:
Function prototype: Should return a `bool` (because it answers a yes/no question) and should take in a single int (to ask whether it's prime).
- An int greater than 2 is prime if it is not divisible by any number between 2 and itself, not including itself.
- Use this function to print out the primes less than 50. Check it against my list:
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47

something is a bit messed up here. When you compile you should probably be getting a warning "not all paths return a value". Listen to this because what happens when x%2==1 is false? The function returns an undefined value.