today was my first day or first experienced in your RUclips channel and I like it most the way you teach sir it's an request to you keep it up and keep teaching us 😊😊
I love your teaching style. The way you teach us is fantastic. The Armstrong number program you taught us in this video , is wrong concept. Please correct it.
I understand what you wrote in this prog i write same but there have under line all variable i can't understand what is the prob? I show you image but in comment no option share image..Please hlp sir..
Aap ka har explanation easy to understand h...Mere liye samjh na bohat asan ho raha h...Keep it up sir, Mera prob solve kar dijiye samaj me nahi a raha kya kare...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner in=new Scanner(System.in); int n=in.nextInt(); int p=n, q=n, count=0, check=0, value=n; while(p!=0){ int rem=p%10; count++; p=p/10; } while(n!=0){ int rev=n%10; check=((int)(Math.pow(rev, count))+check); n=n/10; } if(check==value){ System.out.println(value+" is a Armstrong number"); }else System.out.println(value + " is not a Armstrong number"); } }
sir please tell my mistake I want to check how many armstrongs are there between 151 and 200 import java.util.Scanner; class ams { public static void main(String[] args) { int re,x=0; for(int n=151; n151) { re=n%10; x=x+re*re*re; n=n/10; } if(x==n) { System.out.println(n); } else { System.out.println(" this number is not armstrong"); } }
@@LearnCodingOfficial why don't you teach for n digits 😞 I recommend your channel to all my friend and now they said me that he didn't teach for n digits 😞😞😞 Please make a video for n digits
The way your teaching java is really appreciable.👏
Thank you so much 😊
I hardly do comments but i have to say your teaching way is awesome, Im learning alot from your videos..... Thank you so much.
very nice boss, i can say for 100% that no one in youtube has taught as simple as like you, thank you so much
I agree 💯
Yes you are right
Wow.... Kya Samjhaya apne! Very simple and understandable.
today was my first day or first experienced in your RUclips channel and I like it most the way you teach
sir it's an request to you keep it up and keep teaching us 😊😊
Sir aap ki vajah se me Java sikh paya hu
I liked the video very much and the line explaination with logic best teaching video seen till now
Bohat ache se samjhaya 👏🏻👏🏻👏🏻
Thanks you sir your method is very easy and clear in short time ❤
after While loop the n value will be =0 and we will compare the value 0 in if else. Thanks Sir 👍👍
The way you teach is truly amazing and make so simple to understand
Thank you sir ❤....!
Best explanation ever seen on you tube , great job .
Thank you so much..after years of nt understanding this program..I just done it today👍🏻🙌
I love your teaching style. The way you teach us is fantastic. The Armstrong number program you taught us in this video , is wrong concept. Please correct it.
sir but user can input any length of digit..how can u say its lenth is 3 only
eg:(rem*rem*rem)
tried without while loop..this is working fine for me (give any number within the limit of integer data type)
Scanner sc=new Scanner(System.in);
System.out.println("Enter any number to find out if it is a Armstrong number or not");
int input=sc.nextInt();
String s="";
String count=s.valueOf(input);
int input_size = count.length();
int digit;
double Armstrong=0;
double result=0;
int actual=input;
if(input>0)
{
for(int i=1;i
The "BEST" explanation ever💫
Best video I never comment but u r explaining is so good and simple😊
Wa yaar Bhai achee achee Sikh k jayege
your paper pen work is OSM .thankyou sir.
Best viedo sir Thank you u very much
Thank you so much sir
You are a life saver 🙏🙏
Ek number explain kiya apne logic
You teach programming the best 🙏🙏
bhut gajab ka logic he bhai 👌👌
Thank u sir .
Ur teaching is very easy to learn....
but this logic is not applicable for more than 3 digital numbers
but simple logic for three digitals...thank you so much
same bro
Can we use math. Pow insted of multiplying it will be more easy
Nice explanation sir thank you.
Sir aap bahot achha padhate ho
Check for Armstrong number (any digit number):
ruclips.net/video/iLVMwuisVTc/видео.html
ek no. sir
SIR I LOVE TEACHING method aap kaha se sir
simple and shandar logic
Thks sir very helpfulll...
Bro agar no. Input liye he to kese pata chalega rem ko kitni bar multiple karna he( rem*rem*rem har program me 3 bar nahi kar skte na)
mast bhai
Thanks bro, finally i understood this logic on your channel ❤️🔥
sir great learning... great knowledge..... smooth understanding ....all the best
Suprr see upr pdate ho
Could you Make Algorithm series with Java
bro make a vedio that is satisfied for all type of armstrong numbers
Nice explanation
You are done great work thank you so much for creating this video ☺️
thank you sir🥰
how calculate to the power n
Like 5^7 or 9^100 etc?
Thank u sir..
Milestone for beginners ❣️
Good job
Great job brother 🎉
Thanks sir ji
Thank you much sir....
sir 1634 Armstrong no hai ya nahi
I also tried my own sir
Please sir make a video on roadmap for Artificial intelligence
simple and nice logic sir thankyou so much
Explanation is great, thanks
thanku bhai
Sir apka koi app h kya jha app paid course krate h aur interview ki taiyari
thank you so much sir
Great
sir but this program is only for 3 digit what if we have n digits in a number but like your explanation
Woww amazing 👍
I understand what you wrote in this prog i write same but there have under line all variable i can't understand what is the prob?
I show you image but in comment no option share image..Please hlp sir..
Aap ka har explanation easy to understand h...Mere liye samjh na bohat asan ho raha h...Keep it up sir,
Mera prob solve kar dijiye samaj me nahi a raha kya kare...
@@futureworld1807 kya problem hai bolo?
Thankyou
thanks
Hi ,it's working only for for 3digits numbers...
yes bhai
thanks sir
kya bath hai😊
Thnx sir
Sir, can share code for strong number with range....
What about 4-digit number ArmStrong number. provide a solution to this
Related
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner in=new Scanner(System.in);
int n=in.nextInt();
int p=n, q=n, count=0, check=0, value=n;
while(p!=0){
int rem=p%10;
count++;
p=p/10;
}
while(n!=0){
int rev=n%10;
check=((int)(Math.pow(rev, count))+check);
n=n/10;
}
if(check==value){
System.out.println(value+" is a Armstrong number");
}else
System.out.println(value + " is not a Armstrong number");
}
}
what if I enter a 4 digit number does it still work?
No not working
What about 4,5,6....digit number.
Thanks
nice explanation ,sir.
Sir.. 2 is an armstrong number but your code prints that it is not..
sir but if we give any other digit no. except three ,then this logic is not working....means for 4,5,6 digit no. this logic is not working
it is working
Armstrong no in between 1 to 500 ka vdo kijiye
pls do it for any number of digits
Great 👍
Dear sir , from 1to 9 all numbers are armstrong number but here this code is not aplicable for 1 to 9.
love you bruhhhh
what if i enter 6756 as input,,code crashes, PLEASE do some thinking before coding
sir please tell my mistake I want to check how many armstrongs are there between 151 and 200
import java.util.Scanner;
class ams
{
public static void main(String[] args)
{
int re,x=0;
for(int n=151; n151)
{
re=n%10;
x=x+re*re*re;
n=n/10;
}
if(x==n)
{
System.out.println(n);
}
else
{
System.out.println(" this number is not armstrong");
}
}
}
}
For 4 digit number!?
Sir This only works for 3 digits
this logic is valid for only 3 digit numbers
Yes it's only for three digits. See the video of smart programming. Fir any number of digits
Yes you are right
Yes
No
Exactly I need a program for n digits
Any video suggestion
please DSA sikhao Java mein
it's easy 👌
Please Share kr do 🙏🙏🙏
@@LearnCodingOfficial why don't you teach for n digits 😞
I recommend your channel to all my friend and now they said me that he didn't teach for n digits 😞😞😞
Please make a video for n digits
Sir Armstrong 2 digit ka bhi hota hai???
no
Is we take a 9474 it's not working because that power is 9^4+4^4+7^4+4^4=9474
What if the User Enters 4 digit number
My code is applicable to every numbers
Why did you multiply three times, what ur user enter 4 digit number
But what if the number is of more than 3 digits??
Sir python program bhi skate.
"1634 "is also a Amstrong number this code is not working for that input.
Sir, please make a video on Rotating number like that 1234-...4123,3412
while(n>0)
{
rev=(rev*10)+ n%10;
n=n/10;
}
System.out.println(rev);
public static void main(String[] args)
{
System.out.println("enter a number");
int n ,z, rev=0;
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
// z=n;
while(n>0)
{
rev=(rev*10)+ n%10;
n=n/10;
}
s.o.p(rev);
SIR JI 1634 is also armstrong number par yeh us par kaam nhi krega plzz pehle value count karke bnaiye
Because you declared three number inputs in this, that is why it is not happening