C program to express a number as a sum of two prime numbers

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 พ.ย. 2024
  • Like, Comments, Share and SUBSCRIBE
    visit www.mysirg.com for all FREE videos

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

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

    Sir thanks alot for these courses ....

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

    Amazing explained this programme thank you for this 👍👍👍👍

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

    superb explanation technique thanks.

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

    Great explanation sir! Loved it.. Aap bahat achche kaam kr rehe hoo.. Free mein knowledge de rehe hoo... Take a bow.. Dil se..

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

    Sir you are genius !!!

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

    Thanks a lot sir, your videos are life saving !! By the way can you provide the code "express a number as a sum of three/four prime numbers"?
    e.g:: 19=3+5+11 or 17=2+3+5+7

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

    Thanx A lot Sir... I'm Wating for this Video.. You are Great sir..

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

    OMG⚡ what an explanation!!!!

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

    wow, that feels great. when you code it yourself.
    All I needed to watch the first 5 minutes. and it is done

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

    Thanks alot Sir. It's really helped me alot

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

    i love to listen you.....sir..u r awesome

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

    thank you it was useful, thanks

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

    Sir, optimise the code. It may give TLE runtime error. The Logic is totally fine.

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

    thanks a lot sir

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

    Sir 2 is a prime number and 3 is a composite number

  • @MrHowTo-cw2op
    @MrHowTo-cw2op 6 ปีที่แล้ว +2

    amazing

  • @rethsitha4438
    @rethsitha4438 7 ปีที่แล้ว

    Thanks a lot of your videos

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

    I wish this was in English.. Could you add a translation?

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

    Bro, 2 is prime number.

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

    Sir
    return(0)
    return(1)
    Q mention kiye?? Last ka function mein

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

    I want this video in english explanation

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

    sir how to calculate electricity bill in c language sir i am beginner so plz make video for this

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

    sir can you explain this code in python.......

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

    whether I search for programs urs will come first but I dont know hindi can u pls explain in English also pls😔

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

    Function se or program btadete sir such as fabonacci series

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

    Sir why we have returned (0) and (1) in isprime function and also we dont have checked if x is prime or not ...

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

    i really needed it . (-:

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

    Sir it is not working for 11 .. bcz 11 is not the sum of any two prime numbers

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

    Sir Ji ne aakhir kaar apna name add to Dictionary kr hi diya.😂😂

  • @kuldeepmishra1206
    @kuldeepmishra1206 7 ปีที่แล้ว

    sir ur vidios are awsome but going throgh nielit questions papers i m getting imense confused in c programming . while trying to sole pz tel me
    1.5
    For the following definitions
    char a[] = "Hello World!";
    int i;
    Which of the following loop will print the output a
    s
    Hello World!
    A)
    for (i = 0; a[i] != '/0'; i++)
    printf("%s", a[i]);
    B)
    for (i = 0; a[i] != '/0'; i++)
    printf("%c", a[i]);
    C)
    for (i = 0; a[i] != '\0'; i++)
    printf("%s", a[i]);
    D)
    for (i = 0; a[i] != '\0'; i++)
    printf("%c", a[i]);
    and in the above programme in case of A if i put '/0'is repalced by any character such as // it gets infinite loop and if i put '\0' it gets only output 11 times ..why as i did in code blocks
    void main()
    {
    char a[] = "Hello World!";
    int i=0;
    while(a[i]!='/0')
    {
    printf("%d",i);
    printf("%s

    ", a);
    getch();
    }
    }and pz explain all the optoion..

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

    Ok

  • @sumanbharti122
    @sumanbharti122 7 ปีที่แล้ว

    sir but mera to pura output show ho raha h means after 17+17 ke bad v show ho raha h but apke programm m to nahi hua ta jbki mn apka hi program execute kara ta kya problem h jo aisa show ho raha h

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

    sir when we have to use return 0 and return 1 . I saw on google it say that in main() it's meaning is different and in function it's meaning is different but i did not understand totally so please explain in simple manner

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

      Can you explain you're problem once again I can't understand your q.

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

      @@Shahed1823 Bro why have Sir used do while loop can you explain?

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

      @@rangamdeka6178 you need to check from (n+1)th number, for nextPrime.
      you could have use while loop too, in that case you need to increment n outside loop. here do while incrementing n without checking condition at first.

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

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

    Your videos are really good but you made a mistake, 2 is a prime number

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

      Im really sorry I know I should have watched the whole video. Nevermind me I hava a tendency to get mad at things very easily.
      By the way you are the only Indian teacher I can rely on.

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

    Could you plz provide Video lecture on Computer organisation and architecture, my preferred book in structured computer organisation by tenenbaun

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

      Visit www.mysirg.com and see computer fundamentals course

  • @madhaviborhade9117
    @madhaviborhade9117 7 ปีที่แล้ว

    Sir, when i am going to compile this program on turbo, system is asking prototype of nextprime and isprime function. pls. advise.

    • @persianhenry2897
      @persianhenry2897 6 ปีที่แล้ว

      In c++ you have to include the function prototype top of the code.

    • @tarunpandey9640
      @tarunpandey9640 5 ปีที่แล้ว

      Function ko declare nhi kiya shi se

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

    Sir i didnt understand that while(!isPrime(n))

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

      well I think u don't have proper knowledge of do while loop. In do while loop If the condition is true, the flow of control jumps back to the do portion. what we want to get here is next prime so if number is not prime jump back to do part and increment number by 1. If number is prime then jump out of the loop and return that next prime number. Have a nice day :-)

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

      @@haveagreatdaywithpeace thankuuuu👍

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

      @@haveagreatdaywithpeace but it does not work properly

  • @cap.blue-97sama99
    @cap.blue-97sama99 6 ปีที่แล้ว

    Thanks sir

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

    Sahi sums📲📲

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

    Error show ho raha hai

  • @indut9316
    @indut9316 6 ปีที่แล้ว

    please explain in English

  • @shubhamdubey7598
    @shubhamdubey7598 7 ปีที่แล้ว

    what if n