0

How to print prime numbers out of a set of user input numbers

Write a C function to check if a number is prime. Use this function to Write a C program that will accept a set of positive integer numbers greater than 2 and when the user enters 0 (zero), the program prints the maximum three prime numbers in that set and terminates. If there are only one or two prime numbers, then only these will be printed. Your program must only accept integer numbers greater than 2. In your program do not use arrays. This is what I have on my assignment I’m working on I may be overthinking it and it’s a simple solution but I’m stuck. I can’t get it to print the prime numbers from a set of numbers. Or run the program when user inputs 0 as an input. https://code.sololearn.com/cAIiibd5lZhk/?ref=app

2nd Mar 2020, 8:24 PM
Zachary Wright
Zachary Wright - avatar
3 Respuestas
+ 1
Zachary Wright do you have any codes to share as we are not here to do your homework assignment for you. But we can assist you if there is an error or other code related issues. Please always include your code attempts... Thanks and happy coding Please follow the 8 rules for getting help from the community https://www.sololearn.com/Blog/38/8-simple-rules-to-get-help-from-the-community
2nd Mar 2020, 8:40 PM
BroFar
BroFar - avatar
+ 1
BroFar sorry i thought i posted it with the question it’s up now
2nd Mar 2020, 8:48 PM
Zachary Wright
Zachary Wright - avatar
+ 1
Zachary Wright here is a few beginning steps that might help you in the right direction https://code.sololearn.com/cQadXBjUEPRp/?ref=app
2nd Mar 2020, 9:38 PM
BroFar
BroFar - avatar