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

Поділитися
Вставка
  • Опубліковано 9 січ 2020
  • 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...

КОМЕНТАРІ • 84

  • @ibrahimgarana2785
    @ibrahimgarana2785 2 роки тому +4

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

  • @KumarAbhijeetSharma
    @KumarAbhijeetSharma 3 роки тому +1

    Thank you brother for this explanation

  • @ansarishadab335
    @ansarishadab335 2 роки тому +15

    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...♥️

  • @foggaming3770
    @foggaming3770 4 місяці тому +1

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

  • @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.

  • @jeebanrout2938
    @jeebanrout2938 Рік тому

    Easy to understand your explanation brother🍻

  • @yumnanizar6555
    @yumnanizar6555 18 хвилин тому

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

  • @user-bd8li1xz1x
    @user-bd8li1xz1x 5 місяців тому +1

    thank you so much bhai

  • @MR_TANMAY_YT007
    @MR_TANMAY_YT007 3 роки тому +1

    Vaiya bohut accha laga ❤❤❤❤ or vi banaye

  • @chandankumarpandey2371
    @chandankumarpandey2371 3 роки тому +1

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

  • @JavedA7202
    @JavedA7202 3 роки тому +2

    thank u so much

  • @manyagupta8679
    @manyagupta8679 2 роки тому +1

    Your handwriting 😍 👌 💓

  • @66_priyeshgurjar97
    @66_priyeshgurjar97 2 роки тому

    Else if else if nhi lagaye ga kya bhai

  • @syedadil7256
    @syedadil7256 2 роки тому

    Nice explanation bro

  • @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.

  • @JavedA7202
    @JavedA7202 3 роки тому +1

    u r great sir

  • @gautambhaskar4160
    @gautambhaskar4160 2 роки тому

    Thankyou ☺️

  • @himanshuchoudhary2514
    @himanshuchoudhary2514 Рік тому +1

    nice video 👏🏻

  • @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..

  • @akshaysingh-md5ks
    @akshaysingh-md5ks 3 роки тому +1

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

  • @avantikaanubhuti9022
    @avantikaanubhuti9022 3 роки тому +4

    Superb explaination, keep it up👍

    • @sharadsingh4560
      @sharadsingh4560 Рік тому

      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 🍫

  • @FinanceMode14
    @FinanceMode14 Рік тому +1

    thank you

  • @theinsanebustle
    @theinsanebustle Рік тому

    thanks ❤

  • @devubs4416
    @devubs4416 3 роки тому +1

    Ausome explanation 😍👏

    • @sharadsingh4560
      @sharadsingh4560 Рік тому

      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 10 місяців тому

      @@vishaluniverse66 🍫🍫🍫🍫🍫😉

  • @sourabhchhipa9923
    @sourabhchhipa9923 2 роки тому

    good
    job.

  • @ayushrastogi9253
    @ayushrastogi9253 2 роки тому

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

  • @altmaskhan2838
    @altmaskhan2838 3 роки тому

    Code error aa rha hai

  • @bhajanpath214
    @bhajanpath214 2 роки тому

    2005 leap year h ya ni

  • @TheNewspaper12
    @TheNewspaper12 2 роки тому

    Thanks u

  • @AllInOne-ov1bs
    @AllInOne-ov1bs Рік тому

    C++ ky lectures nhi hain?

  • @An_misha
    @An_misha Рік тому

    But this is does not satisfy 2016

  • @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 9 місяців тому

      = is for assign and == for give value

  • @inc0g33k
    @inc0g33k 3 роки тому

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

  • @learnwithme9274
    @learnwithme9274 3 роки тому +1

    Sir PDF mil jayega kya leap progmming Ka complete

  • @samosa316
    @samosa316 5 днів тому

    Why 400?

  • @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

  • @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

  • @NITANSHU_IITB
    @NITANSHU_IITB 2 роки тому

    Good 🌺🌺

  • @VishWas24
    @VishWas24 3 роки тому

    this code is wrong

  • @siddhikumbhar502
    @siddhikumbhar502 Рік тому

    it should not divisible by 100

  • @saranshmahajan2580
    @saranshmahajan2580 2 роки тому

    Brackets nhi samjh aayi !!

  • @heyboyeL.
    @heyboyeL. 2 роки тому +1

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

  • @hushnatara9329
    @hushnatara9329 Рік тому +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 Рік тому +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 %......

  • @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

  • @NeighbourHeap
    @NeighbourHeap 2 роки тому

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

  • @aimashakir9783
    @aimashakir9783 2 роки тому

    devc++ py kra dy plz

  • @user-zm7ck2bo4o
    @user-zm7ck2bo4o 11 місяців тому

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

  • @bhoomikaravishankar3303
    @bhoomikaravishankar3303 2 роки тому

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

  • @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 Рік тому

      @@shivam__singh 🤣

    • @vijaykant8077
      @vijaykant8077 Рік тому +1

      Because 400 se jo divide hoga wo leap century hogi

  • @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 🧡

  • @079palashpatel9
    @079palashpatel9 3 роки тому

    opoint pe aa\

  • @parveztarafder6724
    @parveztarafder6724 Рік тому

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

  • @naiveyoutuber4281
    @naiveyoutuber4281 Рік тому

    Wrong program

  • @VishWas24
    @VishWas24 3 роки тому

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

  • @DPITHYSYEDSALMANJALAL
    @DPITHYSYEDSALMANJALAL 3 роки тому +1

    Kuch samaj me nai aara 🙏🏻