TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Donovan IT
NA
29
3.1k
if the number is not prime how calculate divide number
Jan 11 2015 8:02 AM
hello all i have this code
int count = 0;
int z=0;
int a = int.Parse(textBox1.Text);
for (int i = 1; i <= a; i++)
{
if (a % i == 0)
count++;
for (int j = 1; j <= a; j++)
{
if (i * j == a)
z = j*i;
}
}
if (count > 2)
MessageBox.Show("Not Prime " + z);
else
MessageBox.Show("Prime");
now i want to know if the number is not prime so what number can divide into .... thanks for the help
Reply
Answers (
3
)
Leaving page event
how to convert string to bool