Line Break Tag

Image
Line Break Tag Line Break टैग, या `<br>` टैग, HTML का एक inline टैग है जिसका उपयोग टेक्स्ट या सामग्री को एक लाइन से दूसरी लाइन पर ले जाने के लिए किया जाता है। जब आप `<br>` टैग का इस्तेमाल करते हैं, तो वहां जहां यह टैग होता है, वहां का टेक्स्ट या सामग्री एक नई लाइन पर आता है। यहां एक उदाहरण है: ```html <p>यह एक लाइन है।<br>यह दूसरी लाइन है।</p> ``` इस उदाहरण में, `<br>` टैग का उपयोग से "यह एक लाइन है।" और "यह दूसरी लाइन है।" को अलग-अलग लाइनों पर दिखाया जाएगा, जबकि `<p>` टैग से दोनों को एक पैराग्राफ के रूप में प्रदर्शित किया जाएगा। इस टैग का उपयोग किसी भी स्थिति में किया जा सकता है जब आपको टेक्स्ट या सामग्री को अलग लाइनों पर रखना हो, जैसे कि पता, कविता, या गाने के बोल। 

C Program to check leap year

C Program to check Leap Year

This program checks whether the input year is leap year or not.

Example: Program to check Leap Year

You can check whether a year is leap or not by using this mathematical logic:
Leap Year:
If a year is divisible by 4, 100 and 400 then it is a leap year.
If a year is divisible by 4 but not divisible by 100 then it is a leap year

Not a Leap Year:
If a year is not divisible by 4 then it is not a leap year
If a year is divisible by 4 and 100 but not divisible by 400 then it is not a leap year

Lets write this logic in a C Program. To understand this program you should have the knowledge of following C Programming topic:

  • C Programming If..else, Nested if..else
#include <stdio.h>
int main()
{
    int y;

    printf("Enter year: ");
    scanf("%d",&y);

    if(y % 4 == 0)
    {
    	//Nested if else
        if( y % 100 == 0)
        {
            if ( y % 400 == 0)
                printf("%d is a Leap Year", y);
            else
                printf("%d is not a Leap Year", y);
        }
        else
            printf("%d is a Leap Year", y );
    }
    else
        printf("%d is not a Leap Year", y);

    return 0;
}

Output:

Enter year: 1991
1991 is not a Leap Year

Comments

Popular posts from this blog

What is HTML Element

O"Level Syllabus Update 2020

What is WWW?