5.13 How to print Fibonacci Series in Java Tutorial | Lecture

  Рет қаралды 322,235

Telusko

Telusko

9 жыл бұрын

Join the live batch : www.telusko.com/online.htm
40% off on selected courses only for Subscribers, to know more send an email on teluskotraining@gmail.com
Recommend Books :
1. Head First Java : amzn.to/2owFrf0
2. Java Complete Reference : amzn.to/2osY04k
The Fibonacci number is a set of numbers that starts with a one or a zero, followed by a one, and proceeds based on the rule that each number is equal to the sum of the preceding two numbers, print the series till the number n.
Editing Monitors :
amzn.to/2RfKWgL
amzn.to/2Q665JW
amzn.to/2OUP21a.
Editing Laptop :
ASUS ROG Strix - (new version) amzn.to/2RhumwO
Camera : amzn.to/2OR56AV
lens : amzn.to/2JihtQo
Mics
amzn.to/2RlIe9F
amzn.to/2yDkx5F
Check out our website: www.telusko.com
Follow Telusko on Twitter: / navinreddy20
Follow on Facebook:
Telusko : / teluskolearnings
Navin Reddy : / navintelusko
Follow Navin Reddy on Instagram: / navinreddy20
Subscribe to our other channel:
Navin Reddy : / @navinreddy
Telusko Hindi :
/ @teluskohindi
Subscribe to the channel and learn Programming in easy way.
Java Tutorial for Beginners : goo.gl/p10QfB
Scala Tutorials for Java Developers : goo.gl/8H1aE5
C Tutorial Playlist : goo.gl/8v92pu
Android Tutorial for Beginners Playlist : goo.gl/MzlIUJ
XML Tutorial : goo.gl/Eo79do
Design Patterns in Java : goo.gl/Kd2MWE
Socket Programming in Java : goo.gl/jlMEbg
Spring MVC Tutorial : goo.gl/9ubbG2
OpenShift Tutorial for Beginners : goo.gl/s58BQH
Spring Framework with Maven : goo.gl/MaEluO
Sql Tutorial for Beginners : goo.gl/x3PrTg
String Handling in Java : goo.gl/zUdPwa
Array in Java : goo.gl/uXTaUy
Java Servlet : goo.gl/R5nHp8
Exception Handling in Java : goo.gl/N4NbAW

Пікірлер: 84
@subhojeetsinha7865
@subhojeetsinha7865 7 жыл бұрын
class FibonacciExample1{ public static void main(String args[]) { int n1=0,n2=1,n3,i,count=10; System.out.print(n1+" "+n2);//printing 0 and 1 for(i=2;i
@lavanyavardhellisaikumar1609
@lavanyavardhellisaikumar1609 11 ай бұрын
super bro
@SmartProgramming
@SmartProgramming 6 жыл бұрын
its always pleasure to watch your tutorials, always got something new from each tutorial, thanks a lot sir 👍👍
@AbhiShek-nv3vq
@AbhiShek-nv3vq 7 жыл бұрын
Probably the best and the easiest way.. You rock on!!
@MinWick
@MinWick 3 жыл бұрын
The best java tutorial channel on KZbin. Thankyou so much.
@PaidPal
@PaidPal 8 жыл бұрын
Fantastic tuts Navin, I've tried several others but this seris so far is the best explained! My 5 cents: instead of adding additional 'if()' statement we can simply change 'while' like this: `while(k
@saimegha4289
@saimegha4289 6 ай бұрын
How can uh say it fully sir ? If uh don't mind I am learning student ?
@shatarchigoyal2958
@shatarchigoyal2958 5 жыл бұрын
You sorted my life's 50% problems. Hats off!
@itzdeepak7711
@itzdeepak7711 4 жыл бұрын
Felling blessed I'have a teacher like u
@IQ88612
@IQ88612 6 жыл бұрын
hello , how can I read a number that start with zeros from scanner ,I know how to read a number using scanner but it doesn't read the first zeros to the left, any help please???appreciate that
@niroshannadajah8810
@niroshannadajah8810 9 жыл бұрын
Hi Navin, first of all many thanks for your video, top nortch, I'm a Java beginner, I have a question on this video at 2:51 mns which as below, you say the value of 'a' shifted to 2 on the line 16 where you've wrote a=b; and b=k; would it be possible to explain again please if you dont mind my confusion is on line 15 value of k=2 hence we have (1 1 2) on the output, however how does in line 16 the value of 'a' becomes 2?
@PaidPal
@PaidPal 8 жыл бұрын
+Niroshan Nada'jah It doesn't. In the line 16 value of 'a' still is 1. But the value of 'b' becomes 2 (k). Then the loops start again, but this time the value a = 1, value b = 2 and value k = a+b (3). Now you give `a` value of `b` (2), value `b` value of `k` (3), and the loop starts again...
@adharsh200
@adharsh200 7 жыл бұрын
Awesome :)
@GreaseTrapWiz
@GreaseTrapWiz 6 жыл бұрын
Sir you are fantastic and I thank you for helping a lost student.
@sanisan5787
@sanisan5787 4 жыл бұрын
As u hv given k> =n Then y it's printing numbers below 22..it should print greater numbers na??
@srikanthreddy6991
@srikanthreddy6991 6 жыл бұрын
Easy one now. thanks
@khushii7633
@khushii7633 3 жыл бұрын
when i am running this on an online compiler its output is coming as 1 1, I tried a lot of compilers still the same result
@yugalsingh154
@yugalsingh154 5 жыл бұрын
In previous tutorials,you didn't tell us about how to take input from the user and how to import package or whatever you have done here. This playlist is for beginners and this made it li'l difficult.
@praveermadhupushpa6518
@praveermadhupushpa6518 4 жыл бұрын
so you can watch input tutorials for *JAVA*
@meghnaad8920
@meghnaad8920 3 жыл бұрын
use scanner class
@sagarmeena0210
@sagarmeena0210 3 жыл бұрын
very good sir
@vishnunetha8706
@vishnunetha8706 4 жыл бұрын
I am unable to use the scanner. While I type shift+cntrl+i it is giving me (scanner cannot be resolved) .How Can I use the scanner?Someone please help me 2 get through this.
@digvijaykumar739
@digvijaykumar739 6 жыл бұрын
dear sir in this program u print 1 1 direct any other logic to not print 1 1 direct
@ankitrajsinghnegi6176
@ankitrajsinghnegi6176 5 жыл бұрын
Sir agar hum k =0, a=1,b=0; While(k
@Loidxf_rg_r
@Loidxf_rg_r 5 жыл бұрын
Why you printed out the 1 and 1 Is that cheat ? I want a code that will start at 1 1
@shuvshaw9594
@shuvshaw9594 4 жыл бұрын
very helpful
@AMNyt
@AMNyt 2 жыл бұрын
The logic is right tough this series starts with 0 1 1 5 8 ....... correct me if am wrong, please so for that, this will be the code : public class fibonacciSeries { public static void main(String[] args) { int k, a = 1, b = 0; k = 0; // System.out.println("1 1 "); while(k
@joyenjoy5943
@joyenjoy5943 3 жыл бұрын
can you please do it via memoization.
@yogendrayogi6902
@yogendrayogi6902 7 жыл бұрын
Voice not at all audible
@user-jk5qq6cb5n
@user-jk5qq6cb5n 3 жыл бұрын
How to use this colourful space??
@myhimalayanchants
@myhimalayanchants 6 жыл бұрын
Your approach Towards problem should have more clarity on Transformation from actual Mathematics problem and How is Transformed to a computer problem and you should give more meaningful variable names , It should appear as if Iam watching a crime episode and that becomes more interesting as we get towards catching the culprit by getting the clues . All that is missing in your explanation , atleast you could start with what is previous and what is current value and what the result is
@jasan619
@jasan619 5 жыл бұрын
You are absolutely right! I think the one who is teaching in this part is not Naveen Reddy ji!
@woroodkh2278
@woroodkh2278 6 жыл бұрын
thanx
@dhirajjha1610
@dhirajjha1610 2 жыл бұрын
Can we use" java.util*; "???
@rajeshkushwaha7638
@rajeshkushwaha7638 2 жыл бұрын
if in the input we put 1 result should be 0 only
@unarinemasiavhula1348
@unarinemasiavhula1348 3 жыл бұрын
not me struggling with project euler and coming here for help
@binitsarma6895
@binitsarma6895 2 жыл бұрын
public class Fibonacci { public static void main(String args[]) { int a=0,b=1,k; k=0; System.out.print("0 "); while(k
@praneetw
@praneetw 6 жыл бұрын
your the value spells like diwali
@RehanKhan-jx3ed
@RehanKhan-jx3ed 9 жыл бұрын
sir Rehan,when we use ctrl+shift+i,it will use only for scanner or all the classes and if it is importing all the classes so how we will import other classes?
@rupamrd
@rupamrd 8 жыл бұрын
It's a shortcut to fix all class imports. You can also use alt+enter.
@saadafzal4037
@saadafzal4037 8 жыл бұрын
at line 17 why there is a need of printing" 1 1" ?
@arveersingh9728
@arveersingh9728 8 жыл бұрын
+saad afzal cuz it all starts by 1 1 , and its easier cuz you don't need any algorithm for it.
@sunkararamarao3254
@sunkararamarao3254 5 жыл бұрын
Simple
@jittususanmathew468
@jittususanmathew468 6 жыл бұрын
Fantastic vd0 ....But voice not that audible.....
@RudraaFitness
@RudraaFitness 4 жыл бұрын
Use earphones
@abn1024
@abn1024 2 жыл бұрын
Not getting output
@dipankarghosh9779
@dipankarghosh9779 6 жыл бұрын
Sir,you did not teach us how could i take the value from the user
@dipankarghosh9779
@dipankarghosh9779 6 жыл бұрын
If you showed it in several video then please send me the link
@yewmiii
@yewmiii 6 жыл бұрын
he showed you how. use a scanner
@hakimaenn4647
@hakimaenn4647 5 жыл бұрын
mercii bq
@akshaysatija7505
@akshaysatija7505 7 жыл бұрын
public class MagicNumber { public static void main(String args[]) { int n = 198; int sum=0,num=n; while(num>9) { sum=num;int s=0; while(sum!=0) { s=s+(sum%10); sum=sum/10; } num=s; } if(num==1) { System.out.println(n+" is a Magic Number."); } else { System.out.println(n+" is not a Magic Number."); } } } HELP ME OUT How this program work
@prasadsardesai
@prasadsardesai 5 жыл бұрын
package learningjava; public class Fibonacci { public static void main(String[] args) { int a=0; int b =1; int c; // 1,2 for (int i=1; i
@trendbest377
@trendbest377 5 жыл бұрын
check it for 10..................12 also come in it
@baibhavghimire3827
@baibhavghimire3827 6 жыл бұрын
Better to use Dynamic programming to avoid this sort of Recursive designs...public class FiboDynamic { public static int fibo(int n){ int [] temp = new int[n+1]; temp[0]=1; temp[1]=1; for(int i=2;i
@rohinidevoor3865
@rohinidevoor3865 2 жыл бұрын
Bro voice is too low in few videos.. Even in here, so commenting it.
@divyeshkumarbalar7732
@divyeshkumarbalar7732 2 жыл бұрын
private void getFibboSeries(int num) { int num1=1, num2=1; int count=0; int temp; while(count
@PramodKumar1207
@PramodKumar1207 7 жыл бұрын
//Thank you so much Sir for this tutorial.. I have learnt allot :) // 1 more way which I have tried.. import java.util.Scanner; public class Factorial { int n,num; void input() { System.out.println("Please enter the number to check :"); Scanner sc = new Scanner(System.in); n = sc.nextInt(); num=n; } void output() { double fact=1; while(n>1) { fact=fact*n; n--; } System.out.println("Factorial of "+ num +" is : "+fact); } public static void main(String[] args) { // TODO Auto-generated method stub Factorial f = new Factorial(); f.input(); f.output(); } }
@kritisingh3194
@kritisingh3194 3 жыл бұрын
public class Fibonacci { public static void main(String[] args) { int t1 = 0; int t2 = 1; int n = 50; for( int i = 1; i
@haripakki
@haripakki 4 жыл бұрын
please raise the voice its very low
@abby9192
@abby9192 4 жыл бұрын
Your voice is not audible
@Tyrannosaurus409
@Tyrannosaurus409 8 жыл бұрын
package myproject1; public class DemoFibonacci { public static void main(String[] args) { int i = 1; int j = 1; int k = 1; System.out.println(+i); while(i
@anilkumarsharma8901
@anilkumarsharma8901 2 жыл бұрын
What is graph📈 of fibbpnachi bubble 🤣🤣🤣🤣🤣🤣
@Nino-mf1yk
@Nino-mf1yk 5 жыл бұрын
int dim = 22; int arreglo[] = new int[dim]; for(int x=0;x
@abhishekpatnaik144
@abhishekpatnaik144 3 жыл бұрын
import java.util.Scanner; class Fibanocci{ public static void main(String args[]){ Scanner s=new Scanner(System.in); int f,se,l,i=0; System.out.println("enter first number of ur fibanocci series"); f=s.nextInt(); System.out.println("enter second number of the fibanocci series"); se=s.nextInt(); System.out.println("enter the last numberof the fibanocci series"); l=s.nextInt(); int[] array=new int[10000]; array[0]=f; array[1]=se; System.out.println("fibanocci series is processing..."); System.out.println("processing finished"); for(i=2;il){ break; } } } }
@softmusic8057
@softmusic8057 3 жыл бұрын
Voice is tooooo low
@husseinmatar4156
@husseinmatar4156 2 жыл бұрын
FIBONIKE?
@Visadk
@Visadk 4 ай бұрын
Fibonacci series is starting from 0
@PramodKumar1207
@PramodKumar1207 7 жыл бұрын
import java.util.Scanner; public class Fabonacci { int num = 0; int next=1; int fab=0; void input() { System.out.println("Please enter no till you want: "); Scanner sc = new Scanner(System.in); num = sc.nextInt(); } void output() { while(num >= fab) { System.out.print(fab+" "); fab = fab + next; next = fab - next; } } public static void main(String[] args) { // TODO Auto-generated method stub Fabonacci f=new Fabonacci(); f.input(); f.output(); } }
@Deadshot-kq5zk
@Deadshot-kq5zk 3 жыл бұрын
Telugu channel
@codewithmj7322
@codewithmj7322 7 ай бұрын
WTF HE BE LIKE WRITE INT WRITE WHILE LOOP WRITE THIS WRITE THAT BLA BLA BLA CAN YOU FUCKIN TELL WHY DID YOU USED THAT HOW DO WE LEARN YOU JUST KNOW CODE AND WRITING IT ON IDE
@surjeetmohanty
@surjeetmohanty 5 жыл бұрын
This is not the right way to implement Fibonacci series.
@prathammishra4480
@prathammishra4480 5 жыл бұрын
DUMB...........You won't even find any tutorial that is better than Telusko.
@subhojeetsinha7865
@subhojeetsinha7865 6 жыл бұрын
class FibonacciExample1{ public static void main(String args[]) { int n1=0,n2=1,n3,i,count=10; System.out.print(n1+" "+n2);//printing 0 and 1 for(i=2;i
@woroodkh2278
@woroodkh2278 6 жыл бұрын
thanx
Fibonacci Series In Java With Recursion - Full Tutorial (FAST Algorithm)
15:11
Array vs. ArrayList in Java Tutorial - What's The Difference?
17:36
Coding with John
Рет қаралды 511 М.
Это реально работает?!
00:33
БРУНО
Рет қаралды 4 МЛН
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 30 МЛН
What is Dependency Injection? | Why | Spring
8:17
Telusko
Рет қаралды 694 М.
Frequently Asked Java Program 10: Generate Fibonacci series
9:50
Functional Interface | Lambda Expression in Java
13:56
Telusko
Рет қаралды 143 М.
#51 This and Super Method in Java
12:11
Telusko
Рет қаралды 97 М.
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 809 М.
Java Program #8 - Fibonacci Series of Numbers in Java
6:36
Programming For Beginners
Рет қаралды 16 М.
Generics in Java
14:26
Telusko
Рет қаралды 505 М.
Java Main Method Explained - What Does All That Stuff Mean?
7:10
Coding with John
Рет қаралды 225 М.