C Program to Check a Number is Armstrong or Not | Learn Coding
Vložit
- čas přidán 27. 08. 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 👌👌👌
aapki technic se muje sab samaj aa jata he 🙏🙏👍👍❤❤ THANK YOU Learn Coding
Great explanation ever!
Respect...
Thank you so much sir 💝
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.
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
Sir, thank you so much. 🙏
your explanation is really awesome. 🙏🙏
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..
Thank You Sir So So Much🙏🙏🙏🙏
very very nice explanation i am ur regular viewer thanks for sharing that kind of videos to understand our concepts 🤩😇👌
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
Mauj kar di sir. Aapne jitna pressure pen pe dala hai likhne mai, utna hi pressure hamare dimag se kum ho gaya :-)
Bahut acha video hai
Very good video for this question
Easy to understand concept... Thank you sir..
Best Explanation
Thank you Sir🙏🙏👍
Excellent explanation 👏😀❤
Mst sir g good 👍 u
4:44 bro got connected with another planet
😂👍
👍👍
Thank u sir🙏 and ur videos always help me a lot and ur teaching is commendable sir😊
#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.
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
Your methad is so good 😊😊
Yes it work for four digit number try it with 1634 and do (r*r*r*r)+arm
best explanation thank you sir
Very big congratulations for 1M and salute to your efforts... 🔥🎉🎊
Great explanation thank you 👏
thanks sir mujhe bahut der se sahi video nahi mil arhi thi
The best c education hub in CZcams
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
very nice explanation sir
Very good program thank you
czcams.com/channels/jEOyfxpWMY7tJO9D2rt5JQ.html
Thank you Bhai nice explanation
Ese hi vidio bnate rho
Sir you're awesome 🎉
King of coding♥️♥️♥️
Sir your videos are very helpful....ur explanations are awesome....
Thank you so much sir your videos helps us alot 💓
czcams.com/channels/jEOyfxpWMY7tJO9D2rt5JQ.html
Thank you sir
It was helpful
Great explanation sir 😊😊💜
Simplest explanation sir 🔥🔥🔥
aapka explanation bhut achha hota h ❤❤❤
Good explanation 👍
Thank you so much 🤗
Thnks sir
Isska program mere sar ke uper se jaa rha tha par abb clear hai
your dry run is fantastic sir
Really very helpful
Thank you sir 😊😀😃🙂😉
Thank you sir ❤
Nice 👍,
Thank You Sir
Thanks sir
Thank you so much Sir 😊
Very well explained sir but how will you very much talent 😮😮😮
Bhott sahiii guruuu Maja aa gya
Very useful thanks 😊
well explained sir
Thank you
🙌
Thanku sir g
GREAT EXPLANATION sir In dry run
Jai ho
Super
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...
Great❤❤❤
Thank you so much 🙏🙏
Super sir ji
Bhai you taught excellent
Superb..👍❤️
thank you sir you're great
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
nice explanation
Awesome explanation
thankuu soo much
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
bhot acha padthe ho aap..
only applicable for 3 digit numbers
thanks buddy and well explained keep bringing these vedios.
Thankyou
Sar computer graphic ki video bhi send kar dijiye important
dry run badhiya kiya
Great Explain 👍
❤❤❤
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......
Great Sir...💯❤️
Great explain sir 😊😁😁😁
nice explain sir👍
Thank you sir🙏
Nice ❤️❤️ concept and explained 🙏🙏
czcams.com/channels/jEOyfxpWMY7tJO9D2rt5JQ.html
Next level explanation 😁😁
Nice explanation 😀
Wah sir
Very helpful , thank u❤
Thanks 👍
Thanks sir 💯🥳
Thank u sir
This is too good 😊😊😊
Programming galat hai
Agar 4 ya 2 ya kitne bhi digit ka number ho to kya karenge
Good explanation.
Thanks 🙏
czcams.com/channels/jEOyfxpWMY7tJO9D2rt5JQ.html
Op bhai
Thanks
Thanku sir
Why divide number by 10 and get remainder
Thank you sir 😌
Njce