Line Break Tag

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

C Program to find factorial of a given number

C Program to find factorial of number using Recursion

This Program prompts user for entering any integer number, finds the factorial of input number and displays the output on screen. We will use a recursive user defined function to perform the task. Here we have a function find_factorial that calls itself in a recursive manner to find out the factorial of input number. We have involved the user interaction in the below program, however if you do not want that part then you can simply assign an integer value to variable num and ignore the scanf statement. In short you can tweak it in any way you want, the logic would be the same for each case.

Program to find factorial

 /* Program Name: Find Factorial
   Written by: Chaitanya Singh
   Published on: beginnersbook.com
 */
#include<stdio.h>
int find_factorial(int);
int main()
{
   int num, fact;
   //Ask user for the input and store it in num
   printf("\nEnter any integer number:");
   scanf("%d",&num);
 
   //Calling our user defined function
   fact =find_factorial(num);
 
   //Displaying factorial of input number
   printf("\nfactorial of %d is: %d",num, fact);
   return 0;
}
int find_factorial(int n)
{
   //Factorial of 0 is 1 
   if(n==0)
      return(1);
 
   //Function calling itself: recursion
   return(n*find_factorial(n-1));
}

Output:

Enter any integer number: 4
factorial of 4 is: 24

Comments

Popular posts from this blog

What is HTML Element

O"Level Syllabus Update 2020

What is WWW?