C Program to Check a Number is Armstrong or Not | Learn Coding
HTML-код
- Опубликовано: 12 сен 2024
- C Language Full Course for Beginners (Hindi) ....!
👇👇👇
• C Programming Full Cou...
Don't forget to tag our Channel...!
#armstrongnumber
#clanguage
#cprogramming
#LearnCoding
#armstrongnumberprogram
#programming
#coding
#cfullcourse
#cprogram
#cprograms
#cbasicprogram
|| Content ||
writer ✍: ankush
voice 🔊: akhilesh
Thank You 👌👌👌
Great explanation ever!
Respect...
Thank you so much sir 💝
aapki technic se muje sab samaj aa jata he 🙏🙏👍👍❤❤ THANK YOU Learn Coding
sir aap pehle hi itne ache se samjha dete hain ki dry run ki zarurat hi nahi padti hain
par sir aapne bus 3 digit armstrong no.s ke liye bataya hain, agar aap general program batate any no. of digit no.s ke liye too aur acha hota bhale hi vo zyada lamba aur complex ho jata
Thank you so much sir for your awesome and simplicity example. when there are some question which I can't solve or hard to understand I just come to you. Now I am a regular viewer and fan of you.
This is very helpful....
Mujhe ye Armstrong name sun ne m hi bdaa hard lagta thaa.....
Lekin aapke itne acche se samjhaane pr ek baar m hii samjh m aa gya wo bhii bina Dry run k.....
Thank you ❤so much.... Aap bahut hi acche se samjhaate h..
Sir, thank you so much. 🙏
your explanation is really awesome. 🙏🙏
what about if any number having more than 3 digit, Then how can program multiply them?
for example if user input 1634 then all digit need to multiply 4 times of itself.
armstrong number means sum of cubes of digits in a number...it doesnt matter how many digits..if the answer is same as the number.Then it is a armstrong number
Use another while loop
very very nice explanation i am ur regular viewer thanks for sharing that kind of videos to understand our concepts 🤩😇👌
Mauj kar di sir. Aapne jitna pressure pen pe dala hai likhne mai, utna hi pressure hamare dimag se kum ho gaya :-)
Thank u sir🙏 and ur videos always help me a lot and ur teaching is commendable sir😊
Very big congratulations for 1M and salute to your efforts... 🔥🎉🎊
The best c education hub in RUclips
What a explain sir❤
Mind blowing
Superb sir I see your video for my doubt only your video clear my doubt❤❤❤❤
Sir one more thing sir give some video for BCA course
Yes it work for four digit number try it with 1634 and do (r*r*r*r)+arm
4:44 bro got connected with another planet
😂👍
bhaiya dhanyavad mai aap video half bhi nahi dheka lekin pura samajh gaya logic mujhey jaha doubt tha na exactlyvo pointvery clear tha aur aap code bahuta acha say smajha rahey hai. Maza aa gaya and akpo subscribe karna banta hai and once again dhanyavad
Best Explanation
Thank you Sir🙏🙏👍
Sir your videos are very helpful....ur explanations are awesome....
Excellent explanation 👏😀❤
Easy to understand concept... Thank you sir..
Bahut acha video hai
Great explanation thank you 👏
Thank You Sir So So Much🙏🙏🙏🙏
Thank you so much sir your videos helps us alot 💓
ruclips.net/channel/UCjEOyfxpWMY7tJO9D2rt5JQ
#include
#include
int main() {
// Declare variables to store the number and its digit count
int num, originalNum, remainder, result = 0, n = 0;
// Read input from the user
printf("Enter an integer: ");
scanf("%d", &num);
// Save the original number for later comparison
originalNum = num;
// Count the number of digits
while (originalNum != 0) {
originalNum /= 10;
++n;
}
// Reset originalNum to the input number
originalNum = num;
// Check if it is an Armstrong number
while (originalNum != 0) {
remainder = originalNum % 10;
result += pow(remainder, n);
originalNum /= 10;
}
if (result == num)
printf("%d is an Armstrong number.
", num);
else
printf("%d is not an Armstrong number.
", num);
return 0;
}
Is this right?
Yes
It's a bit difficult but more general 👍 but why didn't you use the condition like the original number >0. if you are using the original number !=0 it can also include negative numbers lesser than zero.
Good explanation 👍
Thank you so much 🤗
Very good video for this question
Bhott sahiii guruuu Maja aa gya
Great explanation sir 😊😊💜
King of coding♥️♥️♥️
Your methad is so good 😊😊
Simplest explanation sir 🔥🔥🔥
thanks sir mujhe bahut der se sahi video nahi mil arhi thi
thanks buddy and well explained keep bringing these vedios.
Thank you sir
It was helpful
sir but this is only for a 3 digit number what if user input a four digit number . then it would be 1^4 + 2^4 +3^4+4^4 just like that .. this program is only applicable for 3 digit numbers .... it cannot check 4 digit number
yes i also face this problem
No this is not
Only
Digits se matlab nahi hai
Arm no. is a no whose sum of cube of no. is equal to the same no
best explanation thank you sir
Programming galat hai
Agar 4 ya 2 ya kitne bhi digit ka number ho to kya karenge
Thank you Bhai nice explanation
Thnks sir
Isska program mere sar ke uper se jaa rha tha par abb clear hai
Very well explained sir but how will you very much talent 😮😮😮
Mst sir g good 👍 u
Sir you're awesome 🎉
Sar computer graphic ki video bhi send kar dijiye important
aapka explanation bhut achha hota h ❤❤❤
There is small mistake in your concept....An Armstrong number is a number that is equal to the sum of its digits each raised to the power of the number of digits. In other words, if you take each digit in the number, raise it to the power of the total count of digits in the number, and then sum them all together, the result is the original number itself.... and you said about the cubes which is wrong.. Hope it will helpfull...
Very good program thank you
ruclips.net/channel/UCjEOyfxpWMY7tJO9D2rt5JQ
Ese hi vidio bnate rho
very nice explanation sir
👍👍
Thank you sir ❤
Nice 👍,
Sir apke chalte mai programming sikha mujhe pahle nahi samaj aata tha thanku so much sir...Sir interview ka question ka video banaiye sir plzz
Very useful thanks 😊
Jai ho
Thank you so much Sir 😊
it is not the general solution for all armstrong number as when the input is 1634,it shows not armstrong number....it is obvious because in this code we are doing the cube of the digits...but in the original logic of armstrong number we are multiplying n times where n is the length of the number...in case of 153 n will be 3 and in case of 1634 n will be 4...so 1^4+6^4+3^4+4^4=1634......
well explained sir
Thank you
GREAT EXPLANATION sir In dry run
your dry run is fantastic sir
Bhai you taught excellent
Thank you sir 😊😀😃🙂😉
🙌
Why divide number by 10 and get remainder
only applicable for 3 digit numbers
Next level explanation 😁😁
Really very helpful
Thanks sir
Nice ❤️❤️ concept and explained 🙏🙏
ruclips.net/channel/UCjEOyfxpWMY7tJO9D2rt5JQ
Very helpful , thank u❤
Thank You Sir
Great explain sir 😊😁😁😁
Super
Great Sir...💯❤️
Thanku sir g
Thank you so much 🙏🙏
Superb..👍❤️
thank you sir you're great
Great❤❤❤
sir it will not work if our numbers digits 4 or more then 4 than what to do??
Reminder ko 3 ke jagah 4 bar into kroo....simple
Wah sir
This is too good 😊😊😊
❤❤❤
Awesome explanation
Great Explain 👍
It is occurs only for 3 digits not for 4,5..... digits , so it is not user friendly
Good explanation.
Thanks 🙏
ruclips.net/channel/UCjEOyfxpWMY7tJO9D2rt5JQ
Nice explanation 😀
Super sir ji
Sir aap kon sa compiler aur laptop use krte ho?
Dev c it comes with preinsatlled tdm gcc compiler and laptop I don't know
Switch statement pr bhi bnana vedio
Switch statement 👇👇
ruclips.net/video/d-Y4CmyrAuA/видео.html
@@LearnCodingOfficial thank you🙏
Most wlcm
it is only applicable for 3 digit number but if we enter 4 digit number then u should multiply r*r*r*r but ur code doesn't work
thankuu soo much
write a c program to find power of a number using for loop.........explaind with Dry run..
ruclips.net/channel/UCjEOyfxpWMY7tJO9D2rt5JQ
bhot acha padthe ho aap..
Thanks a lot bhai❤😌
nice explanation
This program wont work for number greater than 3 digits .
Thank you sir🙏
nice explain sir👍
Thanks sir 💯🥳
Sir how to check given number is natural or not?