If u think dividing by 4 is sufficient to check a leap year then see this | Leap year program in C

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ย. 2024
  • Buzz number program:
    • Buzz Number Program in...
    #Cprogramming #Cprograms #AbhishekDit
    Hello friends! Welcome to my channel.
    My name is Abhishek Sharma.
    #abhics789
    In this video, i have explained a program to check whether a year is a leap year or not in C Programming language. This will be beneficial for all the Beginners in C Programming.
    If you learned something new do like and share this video with your friends and don't forget to subscribe to my channel :)
    Programming in C: • Programming in C
    There are lectures related to different subjects on this channel.Do check them out, guys.
    Link is given below:
    Interview process details /Placement related Information: • Interview process deta...
    computer graphics:
    • Computer Graphics
    engineering economics:
    • Engineering Economics
    Cryptography :
    • Playfair Cipher Algorithm
    .Net C# :
    • .NET C#
    Pointers in C :
    • Pointers in C Introduc...
    Linked List for Interviews :
    • Introduction to Linked...
    Java Tricky videos/programs for interviews :
    • Java Labelled For Loop...
    File Handling in C :
    • Reading the contents o...
    pointers playlist:
    • Pointers in C
    C Programming tips and tricks:
    • C tricky programs/videos
    Abhishek VLOGS :
    • #VLOG-1 Riding through...
    Concerts :
    • Khushboo Grewal concer...

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

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

    Thank you soooooo much bhai,
    Meri bahot help huyi ❤️
    Me apne sare friends ko ye video share karunga

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

    I'll watch so many videos for leap year concept but can't understand... After watching your video all my doubts get cleared and understand the concept of leap year....
    Thank you your explanation is mind blowing...♥️

  • @66_priyeshgurjar97
    @66_priyeshgurjar97 2 ปีที่แล้ว

    Else if else if nhi lagaye ga kya bhai

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

    Vaiya bohut accha laga ❤❤❤❤ or vi banaye

  • @akshaysingh-md5ks
    @akshaysingh-md5ks 3 ปีที่แล้ว +1

    100 se year ko divide kyu kiya th jb 400 se krna hita h tb

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

    Thankyou ☺️

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

    Means ham 100 se bhi kyu devide karte haii ham directly 400 se bhi kare to bhi pata chalega na 100 se kyu karna hai

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

      100 se isliye divide karte hai kyuki sab se pehle hame pata lagana hota hai ki vo year century year hai ki nhi....
      maan lo tum 100 ki jagah direct 400 se divide karte huye start karo
      Agar year 400 se divide ho gya tab to thik hai vo century year hoga aur leap year bhi
      Lekin agar vo divide nhi hota hai tab vo year century year bhi ho sakta hai aur normal year(not a century year) bhi...
      Tab tumhe check to karna padega na ki vo year century year hai ki nhi kyuki normal year ke liye alag se conditions lagani hoti hai(divisible by 4 wali)...
      To abhi tum check karoge ki vo 100 se divisible hai ki nhi...agar divide ho gaya tab vo year leap year nhi hai kyuki vo starting me 400 se divide nhi huya tha
      Agar 100 se bhi divide nhi hua tab vo normal year hai...to simply divide kardo 4 se agar ho jaaye to leap year varna not a leap year
      Hope it will help you😁

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

      @@anuj_27049 acha explain kie ho, thanks

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

      @@mariyamartistry Wlcm bro

  • @rahulverma-o2x
    @rahulverma-o2x ปีที่แล้ว

    your program is wrong because enter yera 1900 so 1900 is not devide 400 so execute else

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

    Thanks u

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

    Why 400?

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

    2005 leap year h ya ni

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

    Why don't we divide only by 400 .... Why we need 4 & 100 ??

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

      I would suggest you see mathematics behind this instead of direct c language logic.

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

      int main()
      {
      int year;
      cin>>year;
      if(year % 400 == 0) {
      cout

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

    int main()
    {
    int year;
    cin>>year;
    if(year % 400 == 0) {
    cout

    • @shekhar_np1292
      @shekhar_np1292 7 หลายเดือนก่อน

      Yeah, Your program is correct

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

    after wasting my time an other videos and google search I REACHED THIS VIDEO WHICTH CLEARED MY DOUBT. ❤❤👏👏👌👌. Please bring Python series too bro.

  • @AshishGupta-t2y
    @AshishGupta-t2y 29 วันที่ผ่านมา

    According to your program why 2100 is not leap year. I am not satisfies with your that condition if(year%100==0)

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

    Thanx Broo....
    But I ask 1 question, how we will understand that those values which are put in the programme, is leap or not? How we can guess that in our programme output?? Plzzz

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

      Yeah bro . dude jo bhi digit as I mean any year which is divisible by 4 .aapka koi bhhi year 4 se divide hone vala . leap year hota h And that year which is not divisible by 4 that will not be leap year it will called general year as 2013 ,2015 ,2021 are general year .ok Bhai have a great day 🧡

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

      @@intellectualworld7317 yeahhhh!!
      Sis , I was performed leap year program. Answer was right.

  • @purushottampk4352
    @purushottampk4352 21 ชั่วโมงที่ผ่านมา

    Thanks bhai❤

  • @foggaming3770
    @foggaming3770 6 หลายเดือนก่อน +1

    Thank you bro
    I think this the best video for leap year

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

    If condition galat hai
    If(year%100!=0)
    Not equal equal to

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

    bhai else if else if se bhi kr skte hai ..

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

    2020 is divisible by 4 okk.. But 2020 is not divisible by 400???but 2020 is leap year how??? 🧐🧐

  • @ChinthanaN-r4t
    @ChinthanaN-r4t 7 หลายเดือนก่อน +1

    thank you so much bhai

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

    Wrong program

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

    Sir PDF mil jayega kya leap progmming Ka complete

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

    thank u so much

  • @AjGaming-lh9yk
    @AjGaming-lh9yk 3 ปีที่แล้ว

    Bhai 1program karke dekha dona...WAP in c that reads cost price (cp) and selling price (sp) and calculate the gain or loss percentage..

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

    nice video 👏🏻

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

    Your handwriting 😍 👌 💓

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

    To sir 4000 to 4 and 400 dono Se divide hai to leap year Kyu Nhi hai

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

    thank you

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

    Thank you brother for this explanation

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

    400 say he divide kyu kartay hey

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

      Dude because jis bhi digit men two zero honge vhan par 400 se hi dividing hogi Bhai .
      Example.. if 2400 then 400 se hi dividing hogi.okay
      And dost agr y 2008 & 2012 etc then aapko 4 se hi dividing karni hogi ho dude . have a great day 🧡

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

      @@intellectualworld7317 tumhara Ghar kis state me hai bhai and kis district me

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

      @@intellectualworld7317 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddrdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd

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

      @@shivam__singh 🤣

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

      Because 400 se jo divide hoga wo leap century hogi

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

    Bhai mujhe ye clear kr do ki Esme do bar == kyon lagaya jata h so.plz.explain .the details....

    • @RaniDevi-bv5jl
      @RaniDevi-bv5jl ปีที่แล้ว

      = is for assign and == for give value

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

    You should have used logical operator like && ,! So on

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

    But this is does not satisfy 2016

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

    u r great sir

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

    Instead of so many if we can use
    if(year%4==0 || year%400==0 && year%100!=0)
    Printf ("leap year");
    else
    Printf("non leap year");

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

      Wrong code bro ...of you check 1900. It will show leap but it's not a leap year .... You should use && btwn 4% and 100% ....and || with 400 %......

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

    Easy to understand your explanation brother🍻

  • @AllInOne-ov1bs
    @AllInOne-ov1bs ปีที่แล้ว

    C++ ky lectures nhi hain?

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

    it should not divisible by 100

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

    this code is wrong

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

    What if year%4 !=0
    But year%100 =0
    And even year%400 =0

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

    Nice explanation bro

  • @079palashpatel9
    @079palashpatel9 3 ปีที่แล้ว

    opoint pe aa\

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

    Superb explaination, keep it up👍

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

      Agr tumhe itna samjh aaya toh tk baat btao ki mujhe 4 ka logic samjh aaya pr ye 400 or 100 ka logic samjh nhi aaya can you help this tubelight. I'll give you chocolate 🍫

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

    Brackets nhi samjh aayi !!

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

    thanks ❤

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

    devc++ py kra dy plz

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

    Good 🌺🌺

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

    good
    job.

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

    Jo 4 se divisible hai unka print nhi kr rha hai jaise 2012 ko not leap year aa raha hai according to this programm

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

      Yeah my elder bro .se jo digit I mean any year which is divisible by 4 that is called as leap year and it's feburary month will be 29 days ok . for example as 2008=2004=2012=2016=and 2000 will be divided by 400 because it has two zero .ok or agr any year 4 na divide ho to that will a general year ..28 days of February.okay
      Have a great day 🧡 to you

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

      @@intellectualworld7317 thankyou so much ❤️❤️❤️❤️❤️ YAAR

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

    Code error aa rha hai

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

    Ausome explanation 😍👏

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

      Agr tumhe itna samjh aaya toh tk baat btao ki mujhe 4 ka logic samjh aaya pr ye 400 or 100 ka logic samjh nhi aaya can you help this tubelight. I'll give you chocolate 🍫

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

      @@sharadsingh4560 Century year check krne ke liye 100 se divisibilty check kiya, and if True, uske baad jakr 400 se bhi divisible hona mangta hai. tb jakr wo Leap hai. Eg- 1996 evenly divided by 4 so its leap with no doubt. But when we have century year like 2400, it needs to be checked by 100 to find if it is century year. If yes, then divide by 400.
      Bhai mai larka hu, Smjh aaya to ek chocolate mai bhi deserve krta hu.

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

      @@vishaluniverse66 🍫🍫🍫🍫🍫😉

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

    Sir 400kyu lia hai humne

    • @akshaysingh-md5ks
      @akshaysingh-md5ks 3 ปีที่แล้ว

      Kyu ki 400 se century year check krte h

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

      @@akshaysingh-md5ks thanku

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

      Student ! See if any year which divisible by 4 as 2004=2008=2012 it will absolutely divide by 4 okay but if we have any digit & year as 2000=2400=2800=then it not divisible by 4 it will be divided by 400 because these years have two digit .ok have a good day 🧡

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

    Me was searching for an answer to this question..thankyou

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

    Kuch samaj me nai aara 🙏🏻

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

    When you've no pc...but you love to learn code😊