C Program to Check Whether a Number is Prime or Not | Prime Number Program in C

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024
  • C Program to Check Whether a Number is Prime or Not | Prime Number Program in C | Program to Check Prime Number in C
    Subject: C Language (in Hindi)
    Topic Name: Program to Check Whether a Number is Prime or Not
    📘For More C Programming (Practice Programs)📘
    👇Watch The Complete Playlist👇
    • C Programs For Practice
    💙If YOU THINK our Videos are Helping you Please Support Us by SUBSCRIBING💙
    🔔 & Please Like, Comment & Share our Tutorials 🔔
    For More information : Call us at : +91- 92696-98122 , 8561089567
    Or visit at : www.wscubetech...
    ~Contact us:-
    ►Subscribe: bit.ly/wscubech...
    ► Facebook : / wscubetech.india
    ► Twitter : / wscube
    ► Instagram : / wscubetechindia
    ► LinkedIn : / wscube-tech
    ► TH-cam : / wscubetechjodhpur
    ► Website: wscubetech.com
    ♥️ Thank You ♥️
    #Clanguage #PracticePrograms #CProgramming

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

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

    U deserve a million subs sir....
    Feeling sad by seeing your views 😞🥺🥺

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

    What the .... Is Flag..!!!!
    Why is this use man...
    I never read about this in C ever 😢

    • @Mr.Gabbru
      @Mr.Gabbru ปีที่แล้ว

      Hmm mujhe bhi Jana h

    • @guk469
      @guk469 11 หลายเดือนก่อน

      You can use word prime basically this video show if remainder between numbers are zero then you should change value of flag so woh number prime nae hona flag ki value zero hogi then woh prime hona

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

    Sir apne waha break q likhaa?

    • @Mr.Gabbru
      @Mr.Gabbru ปีที่แล้ว

      For more details please visit to apna college

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

    #include
    #include
    main()
    {
    Int n,I,output;
    Printf("enter a no.");
    Scanf("%d",&n);
    For(I=2; I

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

      Conio is what ?
      It is important to write this!

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

      @@mischieviousgirlif u write conio
      I need to right clrscr() under int
      And at the end write getch()

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

    thnku sir

  • @guk469
    @guk469 11 หลายเดือนก่อน

    Brilliant but you should apply if (n==2) then show prime number but if you used direct this condition how could this condition true for 2 because this changes value of flag to 1 how true for prime

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

    Can you give me solution of this
    write a C program that create data structure that are larger than the amount of physical memory contained in their machine

  • @niharikadhyani
    @niharikadhyani 4 หลายเดือนก่อน

    #include
    int main()
    {
    int num,flag=0,i;
    printf("ENTER A NUMBER: ");
    scanf("%d",&num);
    if(num==0 || num==1)
    {
    flag=1;
    }
    for(i=2;i

  • @BCABoy-b1c
    @BCABoy-b1c ปีที่แล้ว

    #include
    #include
    void main()
    {
    int n, f;
    printf("Please enter any number : ");
    scanf("%d", &n);
    if(n==2 || n==3)
    printf("
    The number %d is a prime number", n);
    else
    {
    if(n%2==0)
    printf("
    The number %d is not a prime number", n);
    else
    {
    for(f=3; ; f+=2)
    {
    if(n%3==0)
    {
    printf("
    The number %d is not a prime number", n);
    break;
    }
    else
    {
    if(f*f>n)
    {
    printf("
    The number %d is a prime number", n);
    break;
    }
    }
    }
    }
    }
    getch();
    }
    Output:
    Please enter any number : 61
    The number 61 is a prime number