Special Programs in C − Check If The Number Is Perfect Number
ฝัง
- เผยแพร่เมื่อ 28 ก.ย. 2024
- C Programming & Data Structures: Special C Programs − Check If The Number Is Perfect Number or Not.
Topics discussed:
1) Perfect Number
2) C program to check if the number is a perfect number
C Programming Lectures: goo.gl/7Eh2SS
Follow Neso Academy on Instagram: @nesoacademy(bit.ly/2XP63OE)
Follow me on Instagram: @jaspreetedu(bit.ly/2YX26E5)
Contribute: www.nesoacademy...
Memberships: bit.ly/2U7YSPI
Books: www.nesoacademy...
Website ► www.nesoacademy...
Forum ► forum.nesoacade...
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#CProgrammingByNeso #CProgramming #PerfectNumberProgram
for(int i = 1; i < number; i++){
if(number % i == 0){
sum += i;
}
}
acctualy you dont need rem variable
You are the best I am in love uth programming because of you
Thanks a lot... Yeah now i am very confident in programming, Because of you..
Sir please upload all topics which you told us in starting to teach
Sir excellent videos and please upload recursion and pointers topic.
Thank you for help......!
Love your explanation sir
👍👍
Neso is best, ❤
Sir! how can we expertise like you.....
in for loop, i
Thenxx 💗💖
Neso is best🙂🙃
Thank you 🙏 guru ji love you 😘😘😘😘😘😘😘😘😘🥰😘🥰😘🥰
Awesome video
Nice sir
please enter the number zero
Hello help me please sar
without using rem variable ,we can directly check if(number%i==0){ sum=sum+i;}
yeah
Using more variables helps you to make the program understand.
Can you teach us "python programming"?
He is teaching now.
thank u so much sir your teaching is really awesome...
A suggestion:
Since we are not taking the number itself as a divisor we can run the iteration to number/2 {int(number/2)+1, to avoid the decimal result in case of odd numbers} to reduce execution time for larger numbers.
exactly
Bro
Could you explain this by giving some example
@@mdf1259 there cant be any divisor after n/2
@@mdf1259 eg 4500 do not have any divisors after 2250
@@nirantarkulkarni9170
Oh ok
What is his logic?
2:00 "R.E.M. - Losing my religion" 🎶
not good
tysm NESO!! Lots of lovee on Valentines 💌💌🙏🙏
Amazing Explanation sir and very attractive presentation 😊
subtitle?
Thank u
I was able to program a solution to the problem based on the definition of a perfect number alone, that's some progress. This is a very good series of lessons, much better than most of the tutorials on offer. Many thanks for the high quality content!
Please upload some videos for 'Design and Analysis of Algorithms(DAA)'.
what subject is taht
Wow this a great video, but sir why shouldn't we divide the number by 2 to cut down the iteration time. Thus for(i=1, i
Sir your have not included the condition when number=0,I think we have to add if(number>0) above while Loop sir
Sir some numbers not satisfy like 4, 12 etc... What can I do then ? Any other logic?
If we enter 10.5 as input. It says 10 is not a perfect number. Why?
Thanks a lot ❤
Thank u
28 is not a perfect number
28 = 1+2+4+7+14
Sir! Will These type of Questions were asked in Gate?