+ 1

according to condition does not work this program. please solve the problem

https://code.sololearn.com/cQdGc30AUHeD/?ref=app

18th Dec 2019, 5:59 PM
M Hassaan
M Hassaan - avatar
7 Respostas
+ 2
M Hassaan you are missing only a '=' in for loop condition(sorry for typo in above comment I wrote if inplace of for), rest is all fine for(i=1;i<=mid;i++)
18th Dec 2019, 7:06 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
divisors of a number will be less than or equal to num/2,so you can make i<=mid as condition in for loop to remove logical error. Also, check a comment in your code about 10 as its proper divisors will be1,2,5 only
18th Dec 2019, 6:24 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
10 is not perfect number , In above , already specified by , Gaurav Agarwal... 10=> 1+2+5=8 != 10
18th Dec 2019, 7:43 PM
Jayakrishna 🇮🇳
0
Can you make me a program with this condition? please
18th Dec 2019, 6:35 PM
M Hassaan
M Hassaan - avatar
0
i apply '=' but not correct working
18th Dec 2019, 7:12 PM
M Hassaan
M Hassaan - avatar
0
Its working.. M Hassaan .
18th Dec 2019, 7:33 PM
Jayakrishna 🇮🇳
0
Only 6 digit. Enter the number 10 is not work.
18th Dec 2019, 7:39 PM
M Hassaan
M Hassaan - avatar