hi! help me.. Construct a c++ program that will accept the integer value. The program will get the factor of the integer..
mario vincent
0
Newbie Poster
Recommended Answers
Jump to PostTo find whether a number 'X' is prime:
Run a loop starting from 2 upto X/2
Inside loop check if X%iterator == 0
if yes then break from the loop and print that number is not prime.
If loop runs till the end the number is prime.Vinayak
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.