Conditionals and Loops + Calculator Program

Sdílet
Vložit
  • čas přidán 1. 07. 2024
  • In this video, we discuss conditionals and loops in Java. We cover if-else statements, adding multiple checks, for, while, do-while loops.
    In addition to this, we also cover some questions to apply things into practice, and also create a calculator program.
    Take part in the learning in public initiative! Share your learnings on LinkedIn and Twitter with #DSAwithKunal & don't forget to tag us!
    👉 Resources
    - Join Replit: join.replit.com/kunal-kushwaha
    - Complete Java DSA playlist: • Java + DSA + Interview...
    - Code, Assignments, & Notes: github.com/kunal-kushwaha/DSA...
    ➡️ Connect with me: www.techwithkunal.com
    =========================================
    Timestamps:
    0:00 Introduction ‌‍‍‍‌‌‍‍ ‌‍‍‌‍ ‌‍‍‌‍‍‌‍ ‌‍‍‌‍‌‍‌ ‌‍‍‌‍‍‍‌ ‌‌‍‍‌ ‌‌‍‍‍
    0:43 Creating New Project
    1:28 Conditions
    2:15 Syntax of if-else statements
    2:54 E1 : if-else statements
    4:56 Multiple if-else statements
    7:20 Loops
    8:46 Syntax of a "for loop"
    9:28 E2 : for loop
    12:40 E3 : for loop
    14:23 Syntax of a "while loop"
    14:48 E4 : while loop
    17:00 When to use "for loop" and "while loop"
    17:57 Syntax of a "do while loop"
    18:22 E5 : do while loop
    18:57 "while loop" vs "do while loop"
    20:44 Solving Questions
    20:51 Q1 : Largest number
    28:12 Q2 : Alphabet case check
    35:03 Q3 : Fibonacci numbers
    43:00 Q4 : Counting occurrences
    49:14 Q5 : Reverse
    53:07 Calculator program
    1:01:54 Outro
    #loops #placement #dsa #interviews

Komentáře • 662

  • @rishabhdhawad
    @rishabhdhawad Před 2 lety +624

    This Java DSA Series is so Addictive 😍

    • @KunalKushwaha
      @KunalKushwaha  Před 2 lety +89

      Thank You!

    • @davs2002
      @davs2002 Před 2 lety +33

      @@KunalKushwaha this frequency of posting tutorials every alternate day is much better than posting every day as it gives us time to practice properly instead of rushing to keep up with you

    • @uncalledbrake603
      @uncalledbrake603 Před 2 lety +42

      @@davs2002 He already mentioned that he'll upload all videos and it will be self paced. Most of us here are in final year and want to brush up all concepts clear before the placements starts so it'll be better if he uploads 1 video everyday.
      Also you can watch videos alternate days and practice in between 😀

    • @sankiGunda.
      @sankiGunda. Před 2 lety +14

      @@davs2002 bhai terko alternative day mei dekhni hai tho dekh sakta hai...par humare pass jada time nehi hai

    • @rishabhdhawad
      @rishabhdhawad Před 2 lety +9

      @@uncalledbrake603 I am still in 2nd Sem 😀

  • @vedanthbaliga7686
    @vedanthbaliga7686 Před 2 lety +171

    Who the heck dislikes this😑. Thanks a lot for the efforts Kunal! Really appreciate it. The series has made me switch from Netflix to studying DSA 😂it's so addictive

  • @sahilanand30
    @sahilanand30 Před 2 lety +18

    This is actually THE MOST premium course in the World!

  • @eitoes
    @eitoes Před 2 lety +63

    This course is very structured. Many tutorials explain concepts but ignore problem solving . Thank you kunal for this course

  • @avanishdubey6556
    @avanishdubey6556 Před 2 lety +36

    I think now everyone can see the Beauty of Java.

  • @kalpoo23
    @kalpoo23 Před 2 lety +12

    Solving any problem flawlessly and with so ease. Wow! Your my new teacher. thanks for your simple and detailed teaching.

  • @ankit_1012
    @ankit_1012 Před 2 lety +22

    I haven't seen.. Anyone teach better..than u Really.. Awsm..

  • @parmarjaynareshbhai6610
    @parmarjaynareshbhai6610 Před 2 lety +9

    Really appreciate your effort 6 videos in 6 days really excited to learn from you.

  • @Humanbeing485
    @Humanbeing485 Před rokem +4

    kunal, you have no idea how much this course is boosting my confidence....i wish one day i could meet you and thank you personally....

  • @Spider-Man_67
    @Spider-Man_67 Před 2 lety +4

    My god I'm amazed by the way u give us the way to build logic for problem-solving, thanks Kunal, never seen such an amazing playlist ever before, thanks, man!

  • @mdbillah9998
    @mdbillah9998 Před 2 lety +3

    You are the best Programmer explaining DSA such a unique way in Java. I absolutely loved it!!!

  • @taongasoko4716
    @taongasoko4716 Před rokem +1

    I literally just started this series and Oh my God this is pure gold!!,...thank you so much for simplifying everything for us

  • @lavanyam3224
    @lavanyam3224 Před 2 lety +126

    Hey Kunal! Don't feel pressurized coz of the comments asking for more videos. The frequency and quality of your video is awesome! Cheers and take ur time! Thanks a lot for this commitment ;))

    • @urjasvi
      @urjasvi Před 2 lety +1

      this comment should get a 💖

    • @Siddharth3029
      @Siddharth3029 Před rokem +1

      Bhaiya isme java language basics se padhai hai kya kyuki Mai beginner hu please reply

    • @mirraza4692
      @mirraza4692 Před rokem

      @@Siddharth3029 yes

  • @tanoypaul
    @tanoypaul Před rokem +12

    Kunal Sir, please continue the series. It would help all of us a lot 🤞🏻The quality you provide is unmatchable. 💥

  • @shubhamagarwal1434
    @shubhamagarwal1434 Před 8 měsíci +8

    # GOD Of DSA
    Hi I am a 11yr exp java guy was searching for some free course on youtube for DSA came accross your course and i just feel love in it...all in one place that too with java...i must say you have done very awsome work...your name will be there on this earth as long as DSA will be asked in interviews...May Supream Lord Vishnu Bless You..✌🙏

    • @user-ig9xc9ws4s
      @user-ig9xc9ws4s Před 5 měsíci

      Hi Shubham, which tech stack are you working now?

  • @sanketkumbhar8887
    @sanketkumbhar8887 Před 2 lety +8

    Favorite Line from all the lectures is: Very Simple Stuff

  • @user-bg9zt9qg1e
    @user-bg9zt9qg1e Před 3 měsíci +1

    One of the best tutorials so far in CZcams (Java). Thank you Kunal

  • @vikastyagi1607
    @vikastyagi1607 Před rokem +39

    Learning DSA has never been this much fun.

    • @Siddharth3029
      @Siddharth3029 Před rokem +4

      Bhaiya isme java language basics se padhai hai kya kyuki Mai beginner hu please reply

    • @nsitkarana
      @nsitkarana Před rokem +2

      @@Siddharth3029 yes. its covering from the basics. go for it

  • @MarkusEicher70
    @MarkusEicher70 Před rokem +10

    Many thanks, Kunal! 🤛 This lesson was a good opportunity for me to practice loops and conditions. Something that for many more experienced developers surely is daily business. I try to make it a habit to first write the pseudo code and the flowchart for the assignments and then I go over to code the solution in Java, JavaScript and Go. This takes a ton of time, but this way the stuff sticks in my old brain. I appreciate your contribution to free education. 🤝

  • @Securitywasted128
    @Securitywasted128 Před rokem +1

    Even my proffessor won't teach like that you.Great man kudos to you.

  • @debasishchakraborty4196
    @debasishchakraborty4196 Před 2 lety +32

    All of your videos from basic to advanced are unavoidable due to your super smart style of teaching. It's a gift for many of us beginner or experienced who so ever I believe.

    • @KunalKushwaha
      @KunalKushwaha  Před 2 lety +5

      You're very welcome!

    • @debasishchakraborty4196
      @debasishchakraborty4196 Před 2 lety

      @@KunalKushwaha one biggest plus point in all your teachings , you are successfully able to generate interest on such difficult topics like DSA of folks watching these videos in a true sense

  • @riddhijoshi1293
    @riddhijoshi1293 Před rokem +2

    Such a great course , I can't stop myself playing next lectures ...doing it one by one

  • @bikramsaha1932
    @bikramsaha1932 Před 2 lety +114

    Awesomeeee🔥 i am literally addicted to this series.. this 2 day gap felt like a lifetime😂..

    • @KunalKushwaha
      @KunalKushwaha  Před 2 lety +89

      I uploaded 6 videos in 6 days what else do you want?

    • @hammad8965
      @hammad8965 Před 2 lety +10

      @@KunalKushwaha May be he is the one who already know basics 😁

    • @bikramsaha1932
      @bikramsaha1932 Před 2 lety +34

      @@KunalKushwaha are na na i didnt mean like that i just meant such is the quality of the content.. it makes waiting worth it😅.. sorry if i choose the wrong words

    • @whycm
      @whycm Před 2 lety +3

      Bhai CIVO channel p v deveops ka bootcamp mein padha rhe h aur twitch p v Opensource(MLH) k liye kl podcast kiye the...so if you are interested in these, you may follow these videos.

    • @maheshmoholkar8088
      @maheshmoholkar8088 Před 2 lety +1

      More videos!!!

  • @akhilreddybollu5551
    @akhilreddybollu5551 Před 2 lety +6

    Every one can teach but no one teach like you 🥰🥰🥰
    Waiting for your next video 😍😍🥰

  • @abhaykumar0215
    @abhaykumar0215 Před 2 lety

    Thanks a lot for such kindness where u r teaching DSA and not charging any penny...

  • @mainakroy7781
    @mainakroy7781 Před 2 lety +2

    Good stuff 👍 Kunal . This series is gonna be great . Excited or what!

  • @amansrivastav6885
    @amansrivastav6885 Před 10 měsíci

    this course is in very detail for begginers
    and covers all important concepts

  • @salonijain8943
    @salonijain8943 Před 2 lety +11

    I never stick onto CZcams lectures series for a long time. But this one has my ❤️

    • @iUtkarsh21
      @iUtkarsh21 Před rokem

      Hey seriously I am not getting anything what he is teaching but I completely want to learn what should I do. I don't know anything about coding.

    • @lakshaydahiya618
      @lakshaydahiya618 Před rokem +1

      @@iUtkarsh21 first learn C or C++ then you will understand , I also didn't understand anything but after learning C I can understand most of it.

    • @imnone
      @imnone Před 9 měsíci

      no learn from durga sir no need of c i never learnt it @lakshaydahiya618 @I@@iUtkarsh21

  • @davidmurege
    @davidmurege Před 8 měsíci +2

    One of the best. This will make pro. Kunal kudos

  • @ammupradeep9360
    @ammupradeep9360 Před 2 lety

    Yes its really blessing to come through your channel lots of love❣️

  • @dhruvirajyaguru7170
    @dhruvirajyaguru7170 Před 2 lety

    thank you finally find a tutor whom gave great content ❤

  • @pooja6380
    @pooja6380 Před rokem +2

    thank you for such amazing playlist....😍Its really helpfull👍

  • @peakygeekyreviews8451
    @peakygeekyreviews8451 Před rokem +1

    noone could teach as better as kunal sir,mean my words guys this is the most understanding and easy explained coarse just follow the assignments question to build more confidence ,and see the result after a month that the level is increased,i highly appreciate this work done by kunal sir i wish i could meet and thanks for all this.

  • @emmanueladesope4178
    @emmanueladesope4178 Před rokem

    Thanks so much Kunal. You are a blessing.

  • @user-lq2yu8zp5y
    @user-lq2yu8zp5y Před 7 měsíci +1

    Its great DSA course ever, first time coding seems interesting😍

  • @Vishwask22
    @Vishwask22 Před rokem +1

    This is Amazing bro! Learnt & practiced as well.

  • @sharannarsingi7578
    @sharannarsingi7578 Před 8 měsíci

    52:43 Even if you print the rem variable the answer will be the same i.e. reverse of that num, all you need to do is initialize the rem variable outside the while loop. THANK YOU for a clear explanation

  • @nishant3904
    @nishant3904 Před 2 lety

    I Must say these videos are CLEAN !

  • @prasannajaga3584
    @prasannajaga3584 Před 2 lety

    keep on coming kunal ! it's really feels awesome ...

  • @Ahmadsadiq21
    @Ahmadsadiq21 Před 2 lety

    This is the best way of teaching.

  • @haris7521
    @haris7521 Před 2 lety

    love this dude , thanks Kunal for the DSA

  • @ravishankarkumar8245
    @ravishankarkumar8245 Před 6 měsíci +1

    In the Video at the instance 34:00 , if we run the program only the first if we enter a valid alphabet then it will show whether it's uppercase or lowercase, but if we right any number it gives output as a Uppercase.
    correct code :
    import java.util.Scanner;
    public class CaseCheck {
    public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    char ch = input.next().trim().charAt(0);
    // check wether it's upper case or lower case
    // && and
    // || or
    if(ch >='a' && ch = 'A' && ch

  • @zhengen
    @zhengen Před 2 lety

    Some of the questions here are easy leetcode questions. Awesome work Kunal

  • @NitinSingh-cs6lp
    @NitinSingh-cs6lp Před 2 lety +5

    Java DSA ...U MADE THE TOUGH ONE SO EASY . Hats off

  • @vaibhavimishra763
    @vaibhavimishra763 Před 9 měsíci

    You are best, the work which u r doing really God will bless u for this🙏🙏👏👏

  • @himanshushukla6451
    @himanshushukla6451 Před 2 lety

    you solving questions was an eyeopener

  • @Soyeb01YT
    @Soyeb01YT Před rokem

    Completed assignment, Awesome explanation.... Moving to next one

  • @sahilanand30
    @sahilanand30 Před 2 lety +3

    This man has removed the fear of java from my mind!

  • @priyankarajput3105
    @priyankarajput3105 Před 2 lety

    In the way, you explain things, is too good.

  • @AnkurKumar-wg3on
    @AnkurKumar-wg3on Před rokem +1

    great video kunal, hands on learning. Feel so much more confident about programming in java.

  • @user-zb2ee1yg5v
    @user-zb2ee1yg5v Před 8 měsíci +1

    Love this course Sir
    It is really amazing 🤩

  • @user-fz1iz5ej9j
    @user-fz1iz5ej9j Před 28 dny

    #Superb series Kunal Bhaiya
    #one & only one😎
    #Eazy to understand
    #No.1 Java+DSA

  • @shekharkumar3535
    @shekharkumar3535 Před 2 lety +1

    Great Explanation brother. Really motivating...

  • @Harsh-wr7ov
    @Harsh-wr7ov Před 2 lety +6

    honestly speaking, i m in 2nd yr, and this is the first time i could understand while loop, kudos man u r greattt

    • @shubhsingh9787
      @shubhsingh9787 Před rokem

      same here vroo....

    • @DevTech.s
      @DevTech.s Před 4 měsíci

      Then how did you make it to 2nd year, if you don't even know basic loops 😂

  • @sabrinanastasi5809
    @sabrinanastasi5809 Před rokem +7

    If I could, I would write this in every video: nobody dedicated so much on the internet to teach such complex subjects in a clear, crystal-clear manner, besides the amazing quality. And tks for teaching in English, I am a native Portuguese speaker and I have English as a second language, however, most of the good videos are available in Hindi and have no translation to English. Tk you forever!!
    (I have you as a reference in terms of learning, better than all my professor in computer science college adding altogether)

    • @KunalKushwaha
      @KunalKushwaha  Před rokem +2

      Thank you

    • @harishrajwani3697
      @harishrajwani3697 Před rokem +1

      @@KunalKushwaha bhyia pls continue DSA series you're much much much better than those paid courses

    • @factmania0803
      @factmania0803 Před rokem

      @@harishrajwani3697 bhai kunal bhaiya ne dsa series complete kiyi to best series hogi

  • @_I_am_AI
    @_I_am_AI Před 5 měsíci +1

    @KunalKushwaha 52:09 why we are adding the numbers but we can simply do ......
    public class reversingNumber {
    public static void main(String[] args){
    int n = 28479;
    while (n>0){
    int x = n%10;
    System.out.print(x);
    n = n/10;
    }
    }
    }

  • @PraphullaJadhav
    @PraphullaJadhav Před 11 měsíci

    Hi Kunal your work is amazing ...I've been working since last 7yrs in IT but I never know how to reverse number & Fibonacci series logic I was just remembering it as I never understood it Thanks brother seriously.

  • @clownyt4310
    @clownyt4310 Před rokem +1

    Dammm addictiveee ❤️🔥🔥❤️..may god bless youu 💓

  • @sigmaprideu
    @sigmaprideu Před rokem

    Bro I was planning to buy course of DSA JAVA from coding ninja and suddenly i searched on CZcams and start playing your videos .Now i am addicted to your channel.Thank you for uploading these quality course,you saved my money.❤❤❤

  • @congomigue9072
    @congomigue9072 Před 4 měsíci +1

    I am enjoying the series by Kunal, literally binge watching this Kunal playlist. I tried to modify the calculator program here and added just a few logic: import java.util.Scanner;
    public class Calculator {
    public static void main(String[] args) {
    // The calculator program tutorial by Kunal;
    Scanner input = new Scanner(System.in); // takes in user input
    // Calculation logic.
    // should be a loop
    while (true) {
    System.out.println("Enter the operator to use ");
    // takes the operand we'll be using
    char op = input.next().trim().charAt(0);
    if (op == '+' || op == '-' || op == '/'|| op == '*' || op == '%'){
    System.out.println("Enter the 2 numbers to use ");
    int res = 0;
    int num1 = input.nextInt();
    int num2 = input.nextInt();
    boolean validCalculation = true;
    if (op == '+') {
    res = num1 + num2;
    } else if (op == '-') {
    res = num1 - num2;
    } else if (op == '/') {
    // But we cant divide a number by 0, it will throw an error.
    if (num2 != 0) {
    res = num1 / num2;
    } else {
    System.out.println("Hey there, this is not valid as it will return infinity");
    validCalculation = false;
    }
    } else if (op == '*') {
    res = num1 * num2;
    } else if (op == '%') {
    if ( num2 != 0) {
    res = num1 % num2;
    } else {
    System.out.println("Hey there, this is will result to an error, cant have this");
    validCalculation = false;
    }
    }
    if (validCalculation){
    System.out.println("Your result is " +res);
    }
    } else if ( op == 'x' || op == 'X') {
    break;
    } else {
    System.out.println("Invalid Operator");
    }
    }
    }
    }

  • @amosujames2818
    @amosujames2818 Před rokem

    Thanks a lot Kunal! Enjoy this section.

  • @sabihasamreen3621
    @sabihasamreen3621 Před 8 měsíci +1

    This is the best lecture series so far.. Thankyou!

  • @vrfod
    @vrfod Před 2 lety +9

    kunal bhaiya i know you must be busy but adding a lecture of you doing an open source project using what we have learnt so far in this course will make it absolutely complete because what most of us lack is implementation and it'd mean the world to us if you'd think about it. Thank you for everything

  • @safvanp1680
    @safvanp1680 Před rokem

    Thank you so much for this series

  • @nobody124...
    @nobody124... Před 2 měsíci +1

    well explained than my college lecturer first i was hating java but now i am loving it

  • @sneharoy5444
    @sneharoy5444 Před 2 lety +1

    the best series on youtube even paid courses are not like this.. hats of to you kunal

  • @singhkr
    @singhkr Před rokem +1

    Take precautions before watching this course
    You will be addicted to this DSA course and fall in love with DSA 😄😆💯

  • @abhishekanxnd
    @abhishekanxnd Před 6 měsíci

    Keep up the good work Kunal! Cheers!

  • @ishaikhmd
    @ishaikhmd Před 2 lety

    Excellent job U R Doing 👍🏻👍🏻

  • @harmankaur3938
    @harmankaur3938 Před rokem

    Thanku kunal for this amazing playlist😇

  • @shashwathsk5266
    @shashwathsk5266 Před 2 lety

    bro thanks for providing such a quality content

  • @_hulk748
    @_hulk748 Před rokem

    Great Explanation Sir🙇‍♂✨🙏❤

  • @rangitsengupta3025
    @rangitsengupta3025 Před 2 lety

    Eagerly waiting for other upcoming videos

  • @ajaysairam1747
    @ajaysairam1747 Před 2 lety

    i have learnt the new approach to find the largest number WOW!

  • @adeshkhandait
    @adeshkhandait Před 2 lety +1

    Great work!!!

  • @siddheshdeshmukh3635
    @siddheshdeshmukh3635 Před 5 měsíci +1

    at 50:59 we can use print without multiplying with 10
    public class reverse {
    public static void main(String[] args) {
    int a=83574;
    int nxt=0;
    while(a>0)
    {
    int mod=a%10;
    nxt=mod;
    System.out.print(nxt);
    a=a/10;
    }
    }
    }
    it's output is 47538 !!!!!

  • @BibekGhoshh1
    @BibekGhoshh1 Před 2 lety +1

    it is actually fun ....i enjoyed whole video...

  • @innocentgamer8670
    @innocentgamer8670 Před 9 měsíci +1

    51:57 another method to solve this is ,,
    class Main {
    public static void main(String[] args) {
    long n = 198451318728144l;
    long rev = 0;
    while(rev

  • @ravishankarkumar8245
    @ravishankarkumar8245 Před 6 měsíci +1

    In the Video at the instance 6:24 , if we run the program only the first if condition is running , else if will not run ... for that i would suggest everybody to write 20000 in the if condition and 10000 in else if condition.
    Example:
    import java.util.Scanner;
    public class Main {
    public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    int salary = input.nextInt();
    if (salary > 20000){
    salary += 3000; //salary=salary+3000
    } else if (salary > 10000) {
    salary += 2000; //salary=salary+2000
    }
    else {
    salary += 1000; //salary=salary+1000
    }
    System.out.println(salary);
    }
    }

  • @satyampandey3136
    @satyampandey3136 Před měsícem

    Thank you so much!! I really mean it.

  • @jasper5016
    @jasper5016 Před rokem +1

    You are really talented and you know how to teach others. Glad I found your channel to learn DSA. Thanks Kunal!

    • @Siddharth3029
      @Siddharth3029 Před rokem +1

      Bhaiya isme java language basics se padhai hai kya kyuki Mai beginner hu please reply

    • @dherya__rakho
      @dherya__rakho Před 11 měsíci

      ​@@Siddharth3029brother kya tumne yeh start kia?

    • @Siddharth3029
      @Siddharth3029 Před 11 měsíci +1

      @@dherya__rakho nahi mai devlop sikh rahu hu abhi baad me dsa karunga

    • @dherya__rakho
      @dherya__rakho Před 11 měsíci

      @@Siddharth3029 web dev? But why.... Agar tum Java pehle karte toh tumhe baad mei web d mei bhi asaani hoti

  • @sivaramapandian3923
    @sivaramapandian3923 Před 2 lety

    Turned out as an inspirational ♥️

  • @vanshajduggal
    @vanshajduggal Před 2 lety +1

    Great job man,love your videos.Kindly do share your journey as a programmer till now.

  • @JSDEVD
    @JSDEVD Před rokem

    Thnks kunal for this. Any person can understand this...

  • @akshitagg1
    @akshitagg1 Před 2 lety

    great videos
    full support kunal bhaiya👍👍👍👍👍👍👍

  • @subhadiproy4002
    @subhadiproy4002 Před 2 lety +3

    Hey kunal bhai..in the multiple if else example shouldn't the condition be if ( salary> 10000 && < 20000 ) rather than only the first part? because if i take only the first part and run it and take a salary 22000.. as the program run it will check the first condition and it will satisfy that.. what i am saying is that shouldn't the conditions in multiple if else statements be disjoint?

  • @AbhishekSharma-me
    @AbhishekSharma-me Před 2 lety +10

    Thanks for the wonderful lectures, theres not even a single day I skipped your lectures from the past week.

  • @utkarshmaurya6877
    @utkarshmaurya6877 Před 2 lety

    Amazing work Kunal ✌️

  • @VinayKumar-cm2nn
    @VinayKumar-cm2nn Před rokem

    Thank you for the captions on!

  • @ShubhamYadav-it7tw
    @ShubhamYadav-it7tw Před 2 lety

    leatraly i don,t have words to say thanks to kunal ❤

  • @codewithraj9517
    @codewithraj9517 Před rokem

    Amazing thank u for great content all time

  • @aayushi_mittal
    @aayushi_mittal Před 2 lety +1

    Amazing!! 💯

  • @priyanshusharma5278
    @priyanshusharma5278 Před 2 lety

    Great work!!😄

  • @shubhamgoswami8751
    @shubhamgoswami8751 Před 2 lety +1

    Thanks for saving my career and my money... thanks🙏

  • @ravishankarkumar8245
    @ravishankarkumar8245 Před 6 měsíci +1

    for fibonacci series,
    taking 0 as 1st position,
    import java.util.Scanner;
    public class Fibo {
    public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    int a = 0;
    int b = 1;
    int count = 2;
    System.out.println(a);
    System.out.println(b);
    while (count

  • @stacktuber
    @stacktuber Před 5 měsíci

    I love your answer, my solution was: //Q: Reverse the given integar
    int n = 16674;
    String numStore = "";

    while(n > 0){
    int last = n % 10;
    String lastString = Integer.toString(last);
    numStore += lastString;
    n /= 10;
    }
    int numInt = Integer.parseInt(numStore);

    System.out.println(numInt);

  • @siddvi266
    @siddvi266 Před rokem +2

    public class fibo {
    public static void main(String[] args) {
    int a=0;
    int b=1;
    System.out.println(a);
    System.out.println(b);
    for (int i = 0; i < 8; i++) {
    int c=a+b;
    System.out.println(c);
    a=b;
    b=c;
    }
    }
    }

  • @sourabhchoudhary1601
    @sourabhchoudhary1601 Před 2 lety

    Next Level 🔥🌟

  • @work_sanskriti6369
    @work_sanskriti6369 Před rokem

    these videos also "make sense !!" ....... I would love to loop my thanks to infinity times

  • @yashtibra3684
    @yashtibra3684 Před 2 lety

    Great video. Love the content