By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Please help!!!

P: 1
ive been stuck on this problem for a while and I cant figure out how to write the program without using anything past looping because I'm a beginner so please help!!
Write a program that prompts the user to input a positive integer. It should then output a message
indicating whether the number is a prime number or not. Solve this program using a flag
controlled loop.
For an added bonus if the number is not prime, you can display all the numbers it divides by.
Dec 21 '17 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 5K+
P: 9,197
This is an exact copy of someone's else's post. This is homework?

First step: What is a prime number?

Post your answer and we'll go from there.
Dec 21 '17 #2

Expert 100+
P: 2,396
Refer to this question.
Dec 22 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.