i have to find proper divisors of a positive integer.for instance,the proper divisor of 15 are 1,3,5.
input 15
output
1 3 5 like that.
Thank you for your helps.
whitech
0
Newbie Poster
Recommended Answers
Jump to Postyou forgot to use '&' in your scanf statement.
scanf("%d",&n);
but what's the point of this
for(m=1;m<n;m++) for(t=1;t<=m;t++) { n=m*t; printf("%d,%d",m,n); }
Jump to PostStep back from your keyboard for a sec and think about the area that needs to be searched. One is a divisor for every integer, so you can start with 2:
n1 is the first candidate divisor, n2 is the second candidate divorsor. Product is n1 * n2. Number …
All 5 Replies
whitech
0
Newbie Poster
D33wakar
36
Posting Whiz in Training
whitech
0
Newbie Poster
Adak
419
Nearly a Posting Virtuoso
cse.avinash
-1
Junior Poster
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.