Program to Print All Prime Numbers between 1 to 100 in Java by Deepak

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น • 204

  • @SmartProgramming
    @SmartProgramming  ปีที่แล้ว +1

    🚩🌳Professional Courses + Projects (Upto 80% off) 🌳 courses.smartprogramming.in
    🔴 Core Java Playlist : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
    🔴 Advance Java Playlist : th-cam.com/play/PLlhM4lkb2sEjVsbbZ_kiixY5CcR84IQUg.html
    🔴 Android Playlist : th-cam.com/play/PLlhM4lkb2sEhdllbTIVF0rzD0coCiuHok.html
    =====================================
    ▶ Core Java Chapter-wise Playlist ◀
    ⭕ 9. Collection Framework in Java | Java Data Structure : th-cam.com/play/PLlhM4lkb2sEiOcuH1g-CUuU288qmMNpyj.html
    ⭕ 8. Multithreading in Java : th-cam.com/play/PLlhM4lkb2sEh1pBs0KBb63PlKKqRx6M1a.html
    ⭕ 7. Strings In Java : th-cam.com/play/PLlhM4lkb2sEh8AARH5oEivYOrMgaVsPFb.html
    ⭕ 6. Exception Handling : th-cam.com/play/PLlhM4lkb2sEjaU-JAASDG4Tdwpf-JFARN.html
    ⭕ 5. OOP's Concepts : th-cam.com/play/PLlhM4lkb2sEhf5NlWeYh_gdcN49pHjVP0.html
    ⭕ 4. Arrays in Java : th-cam.com/play/PLlhM4lkb2sEi4UoqSmobDeA5VNI1f2w3C.html
    ⭕ 3. Control Statements : th-cam.com/play/PLlhM4lkb2sEgQmNKO43i7v60no4bdc3lI.html
    ⭕ 2. Java Introduction : th-cam.com/play/PLlhM4lkb2sEj6zsK25K9f15qNUATqYxGq.html
    ⭕ 1. Programming Basic Terminologies : th-cam.com/play/PLlhM4lkb2sEhwPZhFmlox57kaCgMm5UgC.html
    =====================================
    ▶Advance Java Chapter-wise Playlist ◀
    ⭕ 1. JDBC (Java Database Connectivity) with MySQL : th-cam.com/play/PLlhM4lkb2sEjDXBqaYbwAoDAQKh2yczR7.html
    ⭕ 2. Servlet & JSP Tutorials for Beginners : th-cam.com/play/PLlhM4lkb2sEiiEAP0uSFXiFY8KdXPnN0f.html

  • @saurabhwaghmare393
    @saurabhwaghmare393 5 ปีที่แล้ว +49

    Logic appreciated 👍
    But
    1 is not prime number... Prime number starts from 2

  • @8B54UJANBOSE
    @8B54UJANBOSE 9 หลายเดือนก่อน +1

    Such an underrated channel!.....thank u sir

  • @ayushgarg7644
    @ayushgarg7644 4 ปีที่แล้ว +8

    Very nice explanation, i am having my ip boards, and it really felt very helpful. Thanku Sir !!!

  • @pinkcodermedia8374
    @pinkcodermedia8374 6 ปีที่แล้ว +15

    Sir can u please explain the working of the loop at the point of j

  • @Asadullah_Baloch786Official
    @Asadullah_Baloch786Official ปีที่แล้ว

    Best teacher for java programming language ❤

  • @rakeshbalwant269
    @rakeshbalwant269 3 ปีที่แล้ว +3

    What a Superb Explanation Sir,Thank you so much for this amazing video.It cleared my all doubt.

    • @SmartProgramming
      @SmartProgramming  3 ปีที่แล้ว +1

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Important Java Books: www.amazon.in/shop/smartprogramming?listId=3OFWAB0091PSQ
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Shop With Us: www.amazon.in/shop/smartprogramming
      Facebook Page : facebook.com/smartprogramming.india
      Instagram : instagram.com/smart_programming

  • @vinaykumarmb9125
    @vinaykumarmb9125 3 ปีที่แล้ว +6

    Yes sir, basically am not saw hindi videos but am fall in your program structure in simple way.. beautiful 👌👍🔥

    • @SmartProgramming
      @SmartProgramming  3 ปีที่แล้ว +1

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Important Java Books: www.amazon.in/shop/smartprogramming?listId=3OFWAB0091PSQ
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Shop With Us: www.amazon.in/shop/smartprogramming
      Facebook Page : facebook.com/smartprogramming.india
      Instagram : instagram.com/smart_programming

  • @vidyajadhav8637
    @vidyajadhav8637 ปีที่แล้ว

    GREATE TEACHING SIR ......I AM TOTALLY UNDERSTOOD,,,GBU SIR

  • @shivigautam8733
    @shivigautam8733 5 ปีที่แล้ว +3

    Very good explained sir.. Thanks..

  • @ArabindaMohanty-bu4yw
    @ArabindaMohanty-bu4yw 2 หลายเดือนก่อน +1

    Thanks for great explanation

    • @SmartProgramming
      @SmartProgramming  2 หลายเดือนก่อน

      You are welcome dear, keep learning....
      ---- Below are some of the links of free courses website and playlist :-----
      🌐 Projects & Courses Website : smartprogramming.in
      ▶️ Core Java : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      ▶️ Spring Boot : th-cam.com/play/PLlhM4lkb2sEhcrb1-4eyDE-rXnGNVYsek.html
      ▶️ Spring Framework : th-cam.com/play/PLlhM4lkb2sEgJDGj2zOJnp0y5A5E6li1k.html
      ▶️ Advance Java (JDBC + Servlet + JSP) : th-cam.com/play/PLlhM4lkb2sEjVsbbZ_kiixY5CcR84IQUg.html
      ◾◼️ Connect With Us On ◼️◾
      👉🏻 Facebook Page : facebook.com/smartprogramming.india
      👉🏻 Instagram : instagram.com/smart_programming
      👉🏻 Telegram : t.me/smart_programming_deepak
      👉🏻 Whats App : www.whatsapp.com/channel/0029Va6n2Gs42Dckpa2T1U1i

  • @Ndbdbbdbdbh
    @Ndbdbbdbdbh ปีที่แล้ว

    great explanation! thanks for the solution
    to anyone wondering about it, to take user input & also, make use we dont print 0 and 1,
    we could use the continue statement inside the outer for loop.
    import java.util.Scanner;
    class Main{
    public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n1=sc.nextInt();
    int n2=sc.nextInt();
    for(int i=n1;i

  • @tarannumkhan9284
    @tarannumkhan9284 3 ปีที่แล้ว +4

    Thankyou sir for this wonderful explanation. It really helped me a lot..😊😊

    • @SmartProgramming
      @SmartProgramming  3 ปีที่แล้ว

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Important Java Books: www.amazon.in/shop/smartprogramming?listId=3OFWAB0091PSQ
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Amazon Store: www.amazon.in/shop/smartprogramming
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @rajkumartripathi2855
    @rajkumartripathi2855 5 หลายเดือนก่อน

    Sir bahut badia logic explain Kia hai

  • @ManpreetSingh-tn4jm
    @ManpreetSingh-tn4jm 4 ปีที่แล้ว +7

    AMAZING CONTENT I HAVE EVER SEEN .KEEP IT UP

    • @SmartProgramming
      @SmartProgramming  4 ปีที่แล้ว +2

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @hasnainqureshi1515
    @hasnainqureshi1515 6 ปีที่แล้ว +7

    clear h bhai.......:)

  • @anitahudda8348
    @anitahudda8348 6 ปีที่แล้ว +2

    thank u sir your videos help me a lot in my studies

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว

      Hello anita hudda,
      Thanks a lot for your valuable feedback and support.
      If you are new, Please subscribe to get updates about new videos in the following link:
      th-cam.com/users/smartprogramming

  • @Aulin001
    @Aulin001 5 ปีที่แล้ว +1

    Simply superd explanation sir

  • @event9123
    @event9123 5 ปีที่แล้ว +1

    Thank u sir..I think that is very easy way to solve this problem ..

  • @raghavvhanchate9944
    @raghavvhanchate9944 3 ปีที่แล้ว

    ty sir,tmr i have my computer boards well prepared ty so much...

  • @tishanku
    @tishanku 4 ปีที่แล้ว +2

    U r best sir❤️❤️🙏....god bless u🔥

    • @SmartProgramming
      @SmartProgramming  4 ปีที่แล้ว

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @Sindhus986
    @Sindhus986 3 ปีที่แล้ว

    System.out.println("excellent teaching");

  • @complereinfosystem7323
    @complereinfosystem7323 5 ปีที่แล้ว +2

    wahhh sir g
    very nice teaching ability

    • @SmartProgramming
      @SmartProgramming  5 ปีที่แล้ว

      Hello complere infosystem,
      Thanks a lot for your valuable feedback and support.
      Get updated to my new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the links of all the tutorials in java :
      1. Java Tutorials for Beginners : th-cam.com/video/J1TPKWIPFaE/w-d-xo.html
      2. Control Statements in Java (with programs and patterns) : th-cam.com/video/OUZkdKFeuK0/w-d-xo.html
      3. Arrays in Java (With Algorithms) : th-cam.com/video/dRrjjotgniA/w-d-xo.html
      4. OOPs Concepts in Java : th-cam.com/video/7WhnYwoBY24/w-d-xo.html
      5. Exception Handling in Java : th-cam.com/video/y-NlcLcxiKY/w-d-xo.html

  • @dev_escape
    @dev_escape 4 ปีที่แล้ว +1

    Liked + Subscribed before 02:00 min.

    • @SmartProgramming
      @SmartProgramming  4 ปีที่แล้ว

      Thank you for your feedback. Keep Learning
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Important Java Books: www.amazon.in/shop/smartprogramming?listId=3OFWAB0091PSQ
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Amazon Store: www.amazon.in/shop/smartprogramming
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @Jeetu_Mehar
    @Jeetu_Mehar 2 ปีที่แล้ว

    Acha padate hai sir aap

  • @karansharma96
    @karansharma96 4 ปีที่แล้ว +1

    thankyou very much deepak sir....thanks a lot.
    but sir 1 prob hai ki output me 1 bhi show kr rha which is not a prime no bcz 1 only has one positive divisor (1 itself), so it is not prime. islie jo pehla loop hai na sir usme starting 2 se 100 tak ka krna hoga nhi to jo condition check kr rhe hamlog if(temp==0 ) usko replace krke hamlogo ko if(temp==0&&!=1) shayd to kahi ho jaye sir.....
    well i love you sir you are my favourite com teacher.

  • @IamShekhar-21
    @IamShekhar-21 2 ปีที่แล้ว

    I made changes and user can select range to find list of prime numbers. #thankyou sir you are great

  • @smilekumar9097
    @smilekumar9097 4 ปีที่แล้ว +1

    Sir ur uploads gets SALUTE !!!

    • @SmartProgramming
      @SmartProgramming  4 ปีที่แล้ว +1

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Important Java Books: www.amazon.in/shop/smartprogramming?listId=3OFWAB0091PSQ
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Amazon Store: www.amazon.in/shop/smartprogramming
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @montigupta3111
    @montigupta3111 2 ปีที่แล้ว +1

    Well explained sir ❤️

  • @pankajpaul3803
    @pankajpaul3803 6 ปีที่แล้ว +5

    good deepak bro all the best

  • @rabilochanbauri7255
    @rabilochanbauri7255 3 ปีที่แล้ว

    really very nice explanation,,,, Thank you sir !!!!

  • @PoonamSharma-kk1mq
    @PoonamSharma-kk1mq 4 ปีที่แล้ว +1

    Thank you so much. This is really helpful.

  • @shivangshrivastava9604
    @shivangshrivastava9604 6 ปีที่แล้ว +3

    Best explanation

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว

      Hello Shivang Shrivastava,
      Thanks a lot for your valuable feedback and support.
      If you are new, Please subscribe to get updates about new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the links of all the tutorials in java :
      1. Java Tutorials for Beginners : th-cam.com/video/J1TPKWIPFaE/w-d-xo.html
      2. Control Statements in Java (with programs and patterns) : th-cam.com/video/OUZkdKFeuK0/w-d-xo.html
      3. Arrays in Java (With Algorithms) : th-cam.com/video/dRrjjotgniA/w-d-xo.html

  • @mamtasinha7735
    @mamtasinha7735 6 ปีที่แล้ว +6

    sir if i want to print prime number between 1 to 100 as two,three,five,seven........then how to do this.

  • @easy_learning4107
    @easy_learning4107 2 ปีที่แล้ว +1

    Well cleared

  • @deepanshusaini6242
    @deepanshusaini6242 ปีที่แล้ว

    sir you are the best

  • @rashedkhan4689
    @rashedkhan4689 5 ปีที่แล้ว +1

    great video sir

  • @asshuyadav4798
    @asshuyadav4798 3 ปีที่แล้ว

    Thank you so much sir 😊😊

  • @apexanalysis6337
    @apexanalysis6337 4 ปีที่แล้ว +1

    Clear ha sir point..

    • @SmartProgramming
      @SmartProgramming  4 ปีที่แล้ว

      hahahahha Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @kiran68098
    @kiran68098 2 ปีที่แล้ว +2

    thanks deepak sir

  • @chandramouligandipalli3466
    @chandramouligandipalli3466 4 ปีที่แล้ว

    Awesome explanation sir

  • @pawanpriyadarshi1923
    @pawanpriyadarshi1923 4 ปีที่แล้ว +11

    Hi Deepak Sir,
    Greetings and applaud the effort put by you.
    In the above program 1 is also printed but 1 is neither prime or composite so i have put a correction marked in bold.. I need your approval comment on that so that other who are referring the program do not make that mistake in interviews
    public class ListOfPrimeNumbers {
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    Scanner sc=new Scanner(System.in);
    System.out.println("Enter Starting Number");
    int startpoint=sc.nextInt();
    System.out.println("Enter End/Last Number");
    int endpoint=sc.nextInt();
    int divcount=0;
    if(startpoint==1)
    {
    startpoint=startpoint+1;
    }
    for(int num=startpoint;num

    • @SmartProgramming
      @SmartProgramming  4 ปีที่แล้ว +2

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @AR-ce1fj
    @AR-ce1fj 6 ปีที่แล้ว +15

    For your kind information 1 is not prime ....The definition of a prime number is a positive integer that has exactly two positive divisors. However,1 only has one positive divisor (1itself), so it is not prime.

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว +5

      sorry, thanks my mistake, we have to take the value of i from 2, you are right brother, thank you 🙂

    • @AR-ce1fj
      @AR-ce1fj 6 ปีที่แล้ว +2

      Sir thanku from my side...🤗🤗

    • @anshulsharma5756
      @anshulsharma5756 6 ปีที่แล้ว

      Sir please why you take (j

    • @anshulsharma5756
      @anshulsharma5756 6 ปีที่แล้ว

      @@SmartProgramming Sir please why you take (j

    • @priyankanaik6651
      @priyankanaik6651 6 ปีที่แล้ว

      Sir you have taken value of i from 2 only...yet it is printing 1 as prime number....

  • @somnathchakraborty1965
    @somnathchakraborty1965 4 ปีที่แล้ว +1

    Thanks Bhaiya..

    • @SmartProgramming
      @SmartProgramming  4 ปีที่แล้ว

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Important Java Books: www.amazon.in/shop/smartprogramming?listId=3OFWAB0091PSQ
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Amazon Store: www.amazon.in/shop/smartprogramming
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @tushardixit679
    @tushardixit679 4 ปีที่แล้ว +1

    Thank you so much sir

    • @SmartProgramming
      @SmartProgramming  4 ปีที่แล้ว

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @likhithakagdas7743
    @likhithakagdas7743 4 ปีที่แล้ว +1

    Thank you so much.You're amazing ☺️

    • @SmartProgramming
      @SmartProgramming  4 ปีที่แล้ว

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Important Java Books: www.amazon.in/shop/smartprogramming?listId=3OFWAB0091PSQ
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Amazon Store: www.amazon.in/shop/smartprogramming
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @sarthaksrivastava9368
    @sarthaksrivastava9368 4 ปีที่แล้ว

    Sir really best explanation till now❤️

  • @pratikbangar8421
    @pratikbangar8421 5 ปีที่แล้ว +1

    sir aap achhe sikhate hai lekin thoda slow sikhao .

  • @swag27582
    @swag27582 6 ปีที่แล้ว +3

    Sir collection v video banayiye plz

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว +1

      after 2-3 chapters collections tutorials will be uploaded, till keep learning, thank you

  • @tshende02
    @tshende02 4 ปีที่แล้ว +2

    Sir please make one video on #HashMaps

  • @deepanshusaini6242
    @deepanshusaini6242 ปีที่แล้ว +3

    mujhe 2 din lg gye logic build krne me 😅😅 (i try to buid logic without watching this video and i am successful)
    This is my code :--------->
    int from = 1;
    int to = 100;
    boolean tf = false;
    for (int a = from; a

  • @bavav7653
    @bavav7653 ปีที่แล้ว

    sir dry run bhi krra diya karo ,video voi dekhta hai jise sikhna hai,
    jise aata hai vo ni dekhta .
    its a humble request.

  • @bhupinderkaur5449
    @bhupinderkaur5449 6 ปีที่แล้ว +1

    good discription

  • @gayathrigenedi633
    @gayathrigenedi633 4 ปีที่แล้ว +1

    👍 useful

    • @SmartProgramming
      @SmartProgramming  4 ปีที่แล้ว +1

      Thank you for your feedback.
      Below are some of the links for more videos and information :
      Java Tutorials Serial Wise : th-cam.com/play/PLlhM4lkb2sEhfuXL-2BDrJ67WkUdQ2v9b.html
      Website : www.smartprogramming.in
      Projects & Courses Website : courses.smartprogramming.in
      Download Our Android Application for Notes and Interview Questions : play.google.com/store/apps/details?id=com.smartprogramming
      Follow Us On :
      Facebook Page : facebook.com/smartprogramming.india
      Instagram Page : instagram.com/smart_programming

  • @readytodance6489
    @readytodance6489 5 ปีที่แล้ว +1

    Sir please make a video for explanation of ternery operator

  • @rajatchoudhury3221
    @rajatchoudhury3221 6 ปีที่แล้ว +3

    Sir what value does temp store? Is it the value of the remainder? Also in one of the if statements why if(temp == 0) then i that is the prime number is printed? If the remainder is 0 that means that the number was divisible right sir? Please explain! My exams are on Monday!

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว

      sorry for late reply.
      temp is just a normal variable, you can take any other variable name also.
      temp does not store remainder.
      temp is just a variable which check weather the value is increased or not, is incremented then its not a prime number else it is.

    • @rajatchoudhury3221
      @rajatchoudhury3221 6 ปีที่แล้ว

      @@SmartProgramming Thanks sir!

  • @pauljohnson8708
    @pauljohnson8708 5 ปีที่แล้ว +1

    Can the same program written in c too?

  • @everythingishere6170
    @everythingishere6170 3 ปีที่แล้ว +1

    Is it helpful for class 12 computer??

  • @vickygupta1392
    @vickygupta1392 5 ปีที่แล้ว +1

    Very nice sir

    • @SmartProgramming
      @SmartProgramming  5 ปีที่แล้ว

      Hello vicky gupta,
      Thanks a lot for your valuable feedback and support.
      Get updated to my new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the links of all the tutorials in java :
      1. Java Tutorials for Beginners : th-cam.com/video/J1TPKWIPFaE/w-d-xo.html
      2. Control Statements in Java (with programs and patterns) : th-cam.com/video/OUZkdKFeuK0/w-d-xo.html
      3. Arrays in Java (With Algorithms) : th-cam.com/video/dRrjjotgniA/w-d-xo.html
      4. OOPs Concepts in Java : th-cam.com/video/7WhnYwoBY24/w-d-xo.html

  • @pragyagupta3457
    @pragyagupta3457 5 ปีที่แล้ว +1

    sir please give more programs on series
    requesting you,please sir

  • @sumit1895
    @sumit1895 5 ปีที่แล้ว +2

    Thnx brooo

  • @ruchitatangadkar2533
    @ruchitatangadkar2533 3 ปีที่แล้ว +1

    Tx sir ☺

  • @tilakrajchoubey5534
    @tilakrajchoubey5534 3 ปีที่แล้ว +1

    nice one

  • @swathikeshavaraju7285
    @swathikeshavaraju7285 6 ปีที่แล้ว +3

    suppose i want to give the range as 150 using scanner class and want to print the prime nos from the given range..pls do rply

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว +20

      import java.util.Scanner;
      class PrimeNumbersList
      {
      public static void main(String args[])
      {
      Scanner s=new Scanner(System.in);
      System.out.println("Enter the range till you want to print prime numbers");
      int range=s.nextInt();
      System.out.println("-------------------------------------");
      int temp=0;
      for(int no=1;no

  • @hemantkml2738
    @hemantkml2738 6 ปีที่แล้ว +1

    Simple Armstrong Program IS Here
    package com.java.practice;
    import java.util.Scanner;
    public class ArmstrongNumber {
    @SuppressWarnings("resource")
    public static void main(String[] args) {
    Scanner scanner=new Scanner(System.in);
    System.out.println("Enter Number to check:");
    int number=scanner.nextInt();
    int r,rev=0;
    int save=number;
    while (number!=0)
    {
    r=number%10;
    rev=rev+r*r*r;
    number=number/10;
    }
    if(save==rev)
    {
    System.out.println("Armstrong");
    }
    else
    System.out.println("Not armstrong");
    }
    }

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว

      this logic is wrong for 1 digit or 4-5 digit integer, go through the video once again.
      thank you, keep learning
      If you are new, Please subscribe to get updates about new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the links of all the tutorials in java :
      1. Java Tutorials for Beginners : th-cam.com/video/J1TPKWIPFaE/w-d-xo.html
      2. Control Statements in Java (with programs and patterns) : th-cam.com/video/OUZkdKFeuK0/w-d-xo.html
      3. Arrays in Java (With Algorithms) : th-cam.com/video/dRrjjotgniA/w-d-xo.html
      Show less

  • @lakshmis5860
    @lakshmis5860 4 ปีที่แล้ว +1

    Can you make c++ for beginners in one video please

  • @SujitKumar-kr1bw
    @SujitKumar-kr1bw 6 ปีที่แล้ว +2

    Sir special number pe bhi ek tutorial dijiye pls

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว

      sure, soon special number tutorials will also be uploaded. Thank you, keep learning
      If you are new, Please subscribe to get updates about new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the links of all the tutorials in java :
      1. Java Tutorials for Beginners : th-cam.com/video/J1TPKWIPFaE/w-d-xo.html
      2. Control Statements in Java (with programs and patterns) : th-cam.com/video/OUZkdKFeuK0/w-d-xo.html
      3. Arrays in Java (With Algorithms) : th-cam.com/video/dRrjjotgniA/w-d-xo.html

  • @steer-x6951
    @steer-x6951 5 ปีที่แล้ว +3

    sir please upload video related to while loop and different programs.
    GAURANG Mishra

    • @SmartProgramming
      @SmartProgramming  5 ปีที่แล้ว

      Hello pankaj mishra,
      Many programs are already uploaded whose links are given below, thank you, keep learning.
      Get updated to my new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the links of all the tutorials in java :
      1. Java Tutorials for Beginners : th-cam.com/video/J1TPKWIPFaE/w-d-xo.html
      2. Control Statements in Java (with programs and patterns) : th-cam.com/video/OUZkdKFeuK0/w-d-xo.html
      3. Arrays in Java (With Algorithms) : th-cam.com/video/dRrjjotgniA/w-d-xo.html
      4. OOPs Concepts in Java : th-cam.com/video/7WhnYwoBY24/w-d-xo.html

  • @Siddharth240rko
    @Siddharth240rko 5 ปีที่แล้ว +1

    Sir please tell how-to find prime no between two entered nos

    • @rohanmukherjee6741
      @rohanmukherjee6741 5 ปีที่แล้ว

      This is a python code, it halps you to understand the logic.
      start = 11 # staring point
      end = 25 # ending point
      for i in range(start, end + 1): #for loopo start. range means- start from 11 & # end in 25.
      # If num is divisible by any number
      # between 2 and val, then it is not prime
      if i > 1:
      for n in range(2, i):
      if (i% n) == 0:
      break
      else:
      print(i)

  • @saichand8357
    @saichand8357 6 ปีที่แล้ว +2

    sir can u explain why did u use i

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว +1

      this is because we have to traverse the list from 2 to no-1, bcoz the number is aways divisible with 1 and itself, so we dont have to divide the number by itself

    • @saichand8357
      @saichand8357 6 ปีที่แล้ว

      Thanks for the response

  • @prajapatijinal7019
    @prajapatijinal7019 6 ปีที่แล้ว +2

    Thanks sir

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว

      Hello Prajapati Jinal,
      Thanks a lot for your valuable feedback and support.
      Get updated to my new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the link of all the progrms shown in starting of the videos, thank you.Get updated to my new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the links of all the tutorials in java :
      1. Java Tutorials for Beginners : th-cam.com/video/J1TPKWIPFaE/w-d-xo.html
      2. Control Statements in Java (with programs and patterns) : th-cam.com/video/OUZkdKFeuK0/w-d-xo.html
      3. Arrays in Java (With Algorithms) : th-cam.com/video/dRrjjotgniA/w-d-xo.html
      4. OOPs Concepts in Java : th-cam.com/video/7WhnYwoBY24/w-d-xo.html

  • @roshnibegum7159
    @roshnibegum7159 5 ปีที่แล้ว +1

    Search from 50 onwards and find the first five numbers..sir ye solve kar dijiye pls.

  • @Siddharth240rko
    @Siddharth240rko 5 ปีที่แล้ว +2

    Sir please tell how-to find prime no between 50 no's from the entered no

    • @rohanmukherjee6741
      @rohanmukherjee6741 5 ปีที่แล้ว

      then set one variable for starting point and one variable for ending point..

    • @rohanmukherjee6741
      @rohanmukherjee6741 5 ปีที่แล้ว

      This is a python code, it halps you to understand the logic.
      start = 11 # staring point
      end = 25 # ending point
      for i in range(start, end + 1): #for loopo start. range means- start from 11 & # end in 25.
      # If num is divisible by any number
      # between 2 and val, then it is not prime
      if i > 1:
      for n in range(2, i):
      if (i% n) == 0:
      break
      else:
      print(i)

  • @kamaleshsingh8058
    @kamaleshsingh8058 5 ปีที่แล้ว

    Sir Please upload a video of:
    1-3+5-7+...........upto n terms

  • @swathikeshavaraju7285
    @swathikeshavaraju7285 6 ปีที่แล้ว +3

    sir i want to print a range of prime numbers using scanner class

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว +3

      import java.util.Scanner;
      class PrimeNumbersList
      {
      public static void main(String args[])
      {
      Scanner s=new Scanner(System.in);
      System.out.println("Enter the range till you want to print prime numbers");
      int range=s.nextInt();
      System.out.println("-------------------------------------");
      int temp=0;
      for(int no=1;no

  • @aryan1282
    @aryan1282 4 ปีที่แล้ว +1

    we can also use...boolean instead of temp as:
    package Basics;
    public class prime_100_num
    {
    public static void main(String[] args)
    {
    for(int i=2;i

  • @anjanadaschourasia8433
    @anjanadaschourasia8433 6 ปีที่แล้ว +2

    Is it necessary to give temp

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว

      you can take any variable name other then temp, or you can also take boolean or string or other, you have to just change the 1-2 lines of logic thats it.
      Thank you, keep learning

  • @aniketchavan41
    @aniketchavan41 5 ปีที่แล้ว +2

    Sir Scanner use karke kaise kare prime no 1 to n program

    • @SmartProgramming
      @SmartProgramming  5 ปีที่แล้ว

      Hello Aniket Chavan,
      Thanks a lot for your valuable feedback and support, keep learning.
      Simply take two variables and as the value from user and put them in first for loop.
      Get updated to my new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the links of all the tutorials in java :
      1. Java Tutorials for Beginners : th-cam.com/video/J1TPKWIPFaE/w-d-xo.html
      2. Control Statements in Java (with programs and patterns) : th-cam.com/video/OUZkdKFeuK0/w-d-xo.html
      3. Arrays in Java (With Algorithms) : th-cam.com/video/dRrjjotgniA/w-d-xo.html
      4. OOPs Concepts in Java : th-cam.com/video/7WhnYwoBY24/w-d-xo.html
      5. Exception Handling in Java : th-cam.com/video/y-NlcLcxiKY/w-d-xo.html

    • @aniketchavan41
      @aniketchavan41 5 ปีที่แล้ว

      Ok sir

  • @rajeshkumaryadav8391
    @rajeshkumaryadav8391 4 ปีที่แล้ว

    sir i want to find max prime no between 5 and 29 . useer gives interval 5 to 29 output should be 29.

  • @Deadshot-kq5zk
    @Deadshot-kq5zk 3 ปีที่แล้ว

    Thanks

  • @shivammishra4477
    @shivammishra4477 5 ปีที่แล้ว

    Prime number ka triangle pattern k code pr video banao

  • @naishedhdamor5875
    @naishedhdamor5875 3 ปีที่แล้ว

    Hii sir,
    generates random numbers between 200 to 400 in java.
    ispe video lao sir.

  • @pranaypandu9268
    @pranaypandu9268 4 ปีที่แล้ว

    logic code
    int no=sc.nextint();
    for(int i=1;i

  • @milankbudha
    @milankbudha 4 ปีที่แล้ว

    Aap whiteboard mai ache se samjhaya karo with logic....

  • @nareshkatukojwala3692
    @nareshkatukojwala3692 3 ปีที่แล้ว

    Hi sir, I am following ur videos, after I learn ur tutorials, is it mandatory degree certificate(I have 12TH standard MEC) to grow up career in my life. Please advise me 🙏🙏🙏

  • @sourabhson
    @sourabhson 6 ปีที่แล้ว +2

    please explain here is 2%2==0 ho rha he to kaise 2 print karega because condition true ho jaegi and temp=1 hoga

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว +1

      check out this condition, for(int i=2;i

    • @sourabhson
      @sourabhson 6 ปีที่แล้ว +1

      Okk got it. Thank you very much

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว

      you are welcome, keep learning

  • @Sanjeev_Singh397
    @Sanjeev_Singh397 5 ปีที่แล้ว +1

    when i entered 0 and 1 ,they says prime number but this is not right concept,In math 0 and 1 are not prime number,prime number starts with 2.please help me out.
    thank you.

  • @ManojJain-gj6sm
    @ManojJain-gj6sm 5 ปีที่แล้ว +2

    How can we make it with user entered limit

    • @SmartProgramming
      @SmartProgramming  5 ปีที่แล้ว

      Hello Manoj jain..
      With the use of system.in and taking that input as the size and the limite of prime series..
      Thanks a lot for your valuable feedback and support.
      Get updated to my new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the links of all the tutorials in java :
      1. Java Tutorials for Beginners : th-cam.com/video/J1TPKWIPFaE/w-d-xo.html
      2. Control Statements in Java (with programs and patterns) : th-cam.com/video/OUZkdKFeuK0/w-d-xo.html
      3. Arrays in Java (With Algorithms) : th-cam.com/video/dRrjjotgniA/w-d-xo.html
      4. OOPs Concepts in Java : th-cam.com/video/7WhnYwoBY24/w-d-xo.html?

  • @2secondsdialog
    @2secondsdialog 6 ปีที่แล้ว +2

    Modulas or temp define krdo dpk sir

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว

      modulas is to find the remainer and temp is normal variable to just store the value if the value is incremented or not, if incremented then its not a prime no else its a prime no.

    • @rajatchoudhury3221
      @rajatchoudhury3221 6 ปีที่แล้ว

      Sir temp stores the value of what?

  • @neerajprj9161
    @neerajprj9161 5 ปีที่แล้ว

    thank uuuuuuu🙏💕

  • @chinmay5925
    @chinmay5925 5 ปีที่แล้ว +1

    Are u working?
    In which company?

  • @pratikbangar8421
    @pratikbangar8421 5 ปีที่แล้ว +1

    simple logic plz

  • @jeevansuji
    @jeevansuji 4 ปีที่แล้ว

    Print prime numbers between any two numbers

  • @ayyappatellagorla1220
    @ayyappatellagorla1220 6 ปีที่แล้ว +2

    Sir in this program prime no 2 is printed but how

  • @dhruvsingh9243
    @dhruvsingh9243 5 ปีที่แล้ว +5

    1 is neither a prime nor a composite number

    • @SmartProgramming
      @SmartProgramming  5 ปีที่แล้ว

      Hello Dhruv Singh
      Thanks a lot for your valuable feedback and support.
      Get updated to my new videos in the following link:
      th-cam.com/users/smartprogramming
      Below are the links of all the tutorials in java :
      1. Java Tutorials for Beginners : th-cam.com/video/J1TPKWIPFaE/w-d-xo.html
      2. Control Statements in Java (with programs and patterns) : th-cam.com/video/OUZkdKFeuK0/w-d-xo.html
      3. Arrays in Java (With Algorithms) : th-cam.com/video/dRrjjotgniA/w-d-xo.html
      4. OOPs Concepts in Java : th-cam.com/video/7WhnYwoBY24/w-d-xo.html?

  • @khushpreet7732
    @khushpreet7732 6 ปีที่แล้ว +1

    Good

  • @gummadinagalakshmi4083
    @gummadinagalakshmi4083 6 ปีที่แล้ว +7

    Sir in second for loop j

    • @SmartProgramming
      @SmartProgramming  6 ปีที่แล้ว +1

      class PrimeNumbersList
      {
      public static void main(String args[])
      {
      int temp=0;
      for(int no=1;no

  • @suhailahmad6299
    @suhailahmad6299 6 ปีที่แล้ว +3

    Sir agar accept karne ho numbers

  • @DevPatel-nf5mp
    @DevPatel-nf5mp 6 ปีที่แล้ว +1

    Nice explanation

  • @gauravkumar-wi6vs
    @gauravkumar-wi6vs 5 ปีที่แล้ว

    hi, sir how find next and previous prime number