Тёмный

C Program to Find Prime Number 

CodeWithHarry
Подписаться 6 млн
Просмотров 137 тыс.
50% 1

C Program to Check Whether a Number is Prime or not (Primality Test). This video will help you understand various methods of finding the primality of a given number
This video is a part of this C Programming Practice Programs Playlist: • C Language Practice Pr...
►Checkout my English channel here: / programmingwithharry
►Click here to subscribe - / @codewithharry
Best Hindi Videos For Learning Programming:
►Learn Python In One Video - • Python Tutorial In Hin...
►Python Complete Course In Hindi - • Python Tutorials For A...
►C Language Complete Course In Hindi -
• C Language Tutorials I...
►JavaScript Complete Course In Hindi -
• JavaScript Tutorials I...
►Learn JavaScript in One Video - • JavaScript Tutorial
►Learn PHP In One Video - • Learn Php In One Video...
►Django Complete Course In Hindi -
• Python Django Tutorial...
►Machine Learning Using Python - • Machine Learning Tutor...
►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
►Advanced Python Tutorials - • Intermediate/Advanced ...
►Object Oriented Programming In Python - • Object Oriented Progra...
►Python Data Science and Big Data Tutorials - • Python Data Science an...
Follow Me On Social Media
►Website (created using Flask) - www.codewithharry.com
►Facebook - / codewithharry
►Instagram - / codewithharry
►Personal Facebook A/c - / geekyharis
Twitter - / haris_is_here

Опубликовано:

 

6 авг 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 360   
@CodeWithHarry
@CodeWithHarry 4 года назад
Thanks a lot for 500k Subscribers. Means a lot! Should I do Instagram live sometime? Instagram - Instagram.com/codewithharry
@gangadharshaktiman8606
@gangadharshaktiman8606 4 года назад
Congratulations 🎉
@TechWithRushabh
@TechWithRushabh 4 года назад
Pls Pls do live on IG will love it
@santoshkumarmarar7048
@santoshkumarmarar7048 4 года назад
Yes sir we all are waiting
@khizrshaikh9902
@khizrshaikh9902 4 года назад
Yes sir please do it
@ayushchoudhary3484
@ayushchoudhary3484 4 года назад
Congratulations sir ji ....and please come live on Instagram ♥️
@coder_boy
@coder_boy Год назад
Harry bhaiya, in the for loop i*i
@piyushkhatri4965
@piyushkhatri4965 5 месяцев назад
exactly
@RaginiYadav-dw3cm
@RaginiYadav-dw3cm Месяц назад
Yess
@arunangshubiswas1381
@arunangshubiswas1381 4 года назад
Thank you Sir. Your efforts are very high I am sure that if any one follow this series will definitely love to learn C
@rajinderrandhawa7758
@rajinderrandhawa7758 3 года назад
Thanks a lot Harry ... Good explanation for a beginner to understand the concept.
@amanpatel3841
@amanpatel3841 4 года назад
You teaches us a lot Harry bhaiya. Thank you for everything.
@chaitanyakadam5739
@chaitanyakadam5739 4 года назад
can you make the video on software engineer/ agile development plzzzz you explain good ❤️❤️❤️❤️
@noumanbhai7442
@noumanbhai7442 3 года назад
you can learn from gate smashers
@ManishSharma-fi2vr
@ManishSharma-fi2vr 4 года назад
Sir, you tried your best to taught this program and it is understandable.
@harshitachaurasia1246
@harshitachaurasia1246 4 года назад
You r such a nice human... You added everyone's mention to your story.. May God bless u always and you bless us with your amazing content
@akshaykothari1929
@akshaykothari1929 3 года назад
Hi Harry, I think there is a bug in this program. I checked this code for the number 4 and it says it is prime. In the for loop, the condition should be changed to i * i
@vishwabhatt20
@vishwabhatt20 3 года назад
yes, I too checked and then corrected my mistake and wrote...i*i
@silentmahi3030
@silentmahi3030 Год назад
yess
@priyanshuworld
@priyanshuworld Год назад
What happen if we do I think it will resolve the problem i*i
@mohit8363
@mohit8363 9 месяцев назад
Google ka copy paste program hh iska practical program sourab Shukla ka acha hh
@_lonely7
@_lonely7 9 месяцев назад
Thanks bro, I was looking for this solution in comments 😄
@shubhchaudhari7847
@shubhchaudhari7847 4 года назад
5 lakh Congratulations Harry Bhai..❤️💯....Please Ab tak ki journey pe Ek Video Banta hai...Us Video se hume Bohot Inspiration Milegi❤️❤️❤️
@48tejasgupta88
@48tejasgupta88 4 года назад
Thanks for learning such a easy way.
@saiakshagn3553
@saiakshagn3553 Год назад
but , when we give 4 as input it is giving as prime number so i think in for loop we need to put i*i
@baliramgadle
@baliramgadle 4 месяца назад
True!
@tusharsharma2024
@tusharsharma2024 3 года назад
Nice explanation bhaiya.... Get your logic is very convenient 👍👍
@sudhangshudas3099
@sudhangshudas3099 3 года назад
Aapke videos dekh kar hi time complexity ki importance pata chali hai. Pure graduation aur post graduation me teachers ka time complexity padane ka motive ek hi tha ki, examiner ke samne zalil na hona pade.
@imtiyazshaikh6185
@imtiyazshaikh6185 3 года назад
Best explanation on prime numbers💯💯
@latasuthar7904
@latasuthar7904 2 года назад
Sir it was a bit complicated but.. by the end of the vedio the program was clear. Thank you sir😊
@aadityadabli
@aadityadabli 4 года назад
Congratulations for 5 lakh subscribers🔥🔥🔥🔥!!!!!
@codewithharryfanchannel559
@codewithharryfanchannel559 4 года назад
You are superb. Congrats for half million subscribers.
@zeeshannandi2604
@zeeshannandi2604 2 года назад
very smart way to test prime divisibiltiy , impressive !
@jeenas1567
@jeenas1567 3 года назад
Can null statement be used in this program for non-prime numbers?
@viveksharmamca19a39
@viveksharmamca19a39 4 года назад
Congratulations for 500k subscribers sir 😍❤️
@SandipBhattacharya
@SandipBhattacharya Год назад
Thanks for this video. All you have to do to test whether a number is prime or not is to divide it successively by all numbers from 2 to n/2, not n. If the remainder of any of these divisions is zero, the number is not a prime. If none of the remainders results in 0, it’s a prime number. Hope it's clear.
@Sid-ot8dx
@Sid-ot8dx Год назад
it helped
@ramanshukla8498
@ramanshukla8498 Год назад
if number is 2 then its modulus will be 0. then it should show not prime. but 2 is prime number
@gitanshagarwal7597
@gitanshagarwal7597 7 месяцев назад
@ramanshukla8498 ​No it would be a prime number as the loop will only run if (i*i)
@bhartiaggarwal6427
@bhartiaggarwal6427 3 года назад
The efforts you put into your work are genuinely appreciative 🙌 Learning programming had never been so easy before 😇Thanks alot🥰
@AdarshSingh-cb5yf
@AdarshSingh-cb5yf 4 года назад
7 th comment ... Aap ke es student ka...... (You are the best forever )... You are my gurudev..😍😍😍😍😍❤️❤️❤️❤️❤️❤️
@ayushchoudhary3484
@ayushchoudhary3484 4 года назад
Jald hi sir aapka Chanel 1m pe aa jaayengi....Avi underrated Chanel hai ye bahut
@royfamily9273
@royfamily9273 2 года назад
Thanks Harry Bhaiya
@adityabhawsar3526
@adityabhawsar3526 2 года назад
All clear 🙂 thankyou sir
@wahidali6023
@wahidali6023 4 года назад
Harry bhai kamal ho yaar bhagwan apko lambi umar,seht ,tandursti de or puri life apki khushiyo se bhari rhe jeevan me apko bhut safalta mile esi me kamna karta hun ap jo kr rhe ho bas krte ho ak na ak din ap bhut age jaoge ...thank you so much bro apke duara koi kuch kr jayega kuch ban jayega ....
@sandhyayadav172
@sandhyayadav172 3 года назад
@codewithharry , do you have knowledge of Object*(objectstar)
@codinghustler6771
@codinghustler6771 2 года назад
Best explanation man 🙏
@todgaming7937
@todgaming7937 4 года назад
Almost understood it! 😇😇
@rudro314
@rudro314 4 года назад
Congrats 500k...awesome bro.. Keep it up..please make a video on how to add google ad on blog and wordpress website..plszzz
@085_shahkalp8
@085_shahkalp8 Год назад
thank you bhai , you have solved my problem of coding
@mraiofacts
@mraiofacts Год назад
Thank you Harry sir🙏🙏
@masterhashir6152
@masterhashir6152 4 года назад
Congratulations!!!! For 500k subscribers!!!! AB TO PARTY BANTI HAI BOSSS!!!!!😆😆
@thevirendrachavan
@thevirendrachavan 4 года назад
Congratulations for 500k ❤❤
@abhirajput1049
@abhirajput1049 9 месяцев назад
Great video harry bhaii..full explanation given thankyouu so much
@ajithamin9196
@ajithamin9196 4 года назад
KEEP Doing Bro . Congrats on 500k
@shobhitkatiyar9224
@shobhitkatiyar9224 4 года назад
Bhaiya mind blowing concept hai....
@HinduWaffenChief
@HinduWaffenChief 4 года назад
Sir congratulations 1/2 million.... 1 million soon........
@teeshagoyal692
@teeshagoyal692 3 года назад
Sir, yahan for loop me condition me i*i
@abhaypaunikar9857
@abhaypaunikar9857 3 года назад
exactly
@adityashrivastava9033
@adityashrivastava9033 4 года назад
Harry bhai I've watched your each and every video
@subhashthenua7404
@subhashthenua7404 2 года назад
Maza aya bhadiya best explained 👏
@QitmeerHandmade
@QitmeerHandmade 3 месяца назад
Good explanation
@harshsaini1584
@harshsaini1584 2 года назад
Itne easy concept ko apne ,itna hardest kar diya ,ki ab data structure bhi easy lag raha hai ,iske aage
@MananGandhi
@MananGandhi 4 года назад
Congratulations on hitting 500K
@melodiousbeats8339
@melodiousbeats8339 10 месяцев назад
thank you harry sir
@divyasinghrajput4323
@divyasinghrajput4323 7 месяцев назад
Mind blowing 😊
@mjofficial.07
@mjofficial.07 3 года назад
It will get error .eg if n=49 It will check from 2 to 6 and becomes prime but its composite. Therefore code should be : for (int i=2;i*i
@vishwabhatt20
@vishwabhatt20 3 года назад
yes, actually. I too tried this.. thanks, man. it helped me rectifying and correcting my mistake
@rahulpurohit5567
@rahulpurohit5567 3 года назад
yeah i just found out
@shivakarthikrathod2026
@shivakarthikrathod2026 3 года назад
but i got
@ayushsingroly5085
@ayushsingroly5085 3 года назад
It is also showing 4 as prime no. This is also an error in that question.
@ayushsingroly5085
@ayushsingroly5085 3 года назад
Therefore
@mrripergaming1839
@mrripergaming1839 4 года назад
congrats for 500 k harry bhai
@Lalbuilding
@Lalbuilding 4 года назад
nice tutorial harry bhai
@KeshavKumar-gc9pu
@KeshavKumar-gc9pu 4 года назад
Thank you harry bhai
@prateekyadav1126
@prateekyadav1126 4 года назад
congrats harry bhai for 5 lakh subscribe.
@salmanmushtaq7633
@salmanmushtaq7633 4 года назад
congratulations on 500k
@rohanraonallani561
@rohanraonallani561 4 года назад
I think adding a break statement inside if block would increase the time complexity and it would make the code more optimal
@BABITAKUMARI-xg5eu
@BABITAKUMARI-xg5eu 2 года назад
yeah
@racharlashweta7075
@racharlashweta7075 4 года назад
Congratulations for 500k!
@yashbansal1414
@yashbansal1414 4 года назад
Thanku
@harshitachaurasia1246
@harshitachaurasia1246 4 года назад
okay..ye smjh me aa gya root n wala concept ..!
@Anixmusics
@Anixmusics 3 года назад
yaah u r absolutely correct 😋
@aryasharma2357
@aryasharma2357 4 года назад
congratulation for 500k subscribers
@neerabajaj1798
@neerabajaj1798 4 года назад
Congratulations for 500 K subscriber bro
@vipulkumar3162
@vipulkumar3162 3 года назад
thanks harry bhai
@Armygirl-ir3wv
@Armygirl-ir3wv 2 года назад
Thanks a lot sir🙏🙏 plz try to make video on program of armstrong number
@artforeveryone9651
@artforeveryone9651 4 года назад
Please make a C++ SFML tutorial please 🙏🤗🤗
@abhaykumawat195
@abhaykumawat195 2 года назад
Thanks bro
@manmohanwable1929
@manmohanwable1929 4 года назад
CONGRATS FOR 500K SUBSCRIBERS BRO
@sukhvendrakumartak5692
@sukhvendrakumartak5692 3 года назад
clrscr() ke liye kya kar sakte he VS me...
@cinematicgamex8840
@cinematicgamex8840 4 года назад
harry sir mene abhi wordpress ka latest version install kra hai vaha astra ki theme search m show nahi ho rahi hai.....koi reason
@deepsagore8286
@deepsagore8286 4 года назад
Congo harry bhaiya
@CaptainJackSparrow123
@CaptainJackSparrow123 4 года назад
Harry bhai thanks for this course, this course really help me Those who agree hit the like button
@pubggamerzone5077
@pubggamerzone5077 4 года назад
Please make course on Statistics and probability
@patchaakashnarwalstudywithme
@patchaakashnarwalstudywithme 2 года назад
thanks
@DevWithPriyank
@DevWithPriyank 4 года назад
Bhai data structure implementation ki alag playlist bano
@Ayushkumar-ei1kd
@Ayushkumar-ei1kd 4 года назад
Bhaiya , How to rename a file name in VS Code , after pressing F2 , it reduces sound but not renames.... Please reply ASAP.
@Naveen-hj9vx
@Naveen-hj9vx 3 года назад
same here u can rename ur file manully
@vickygupta8376
@vickygupta8376 4 года назад
Harry many video's are available for C programming......plz start video's series on Azure
@dearrousan
@dearrousan 4 года назад
Sir, c language practice program playlist is not displaying in your channel
@srishtiiisingh6595
@srishtiiisingh6595 4 года назад
Sir I am 18, I am learning Python (with your vedios) but ,please will u explain what up next I have to learn
@oyepuru
@oyepuru 4 года назад
Harry Bhai Answer Please Brother Bro Please Make A Video On Competitive Programing How To Start And Can I Use Python For Competitive Programing Or Like People Say choose C++ so can i use c++ only for Competitive coding and python for Devlopment Pleass answer kroo I know both saare comments hai but ans kro ✌️✌️✌️✌️✌️✌️ Love you brother and thanks for giving free education
@anonymusk9397
@anonymusk9397 4 года назад
Bro make you data structure and algorithm series in python too. Please it will be much helpfull please 🙏🙏🙏🙏🙏🙏🙏
@youhubb_654
@youhubb_654 4 года назад
thanks sir
@rockyboy5145
@rockyboy5145 4 месяца назад
if n =9 then what will print ?????????????????????????????/ i know its not prime but the code not understand it because at first when i=2 , 9%2 = not equal to 0, that time the isprime not assign 0, i know also that i will be increase but at 9 why this happening , please anyone tell me what can i do
@053adityakumar9
@053adityakumar9 2 года назад
pls anyone help me when i am running this code every thing is right when i assign n 4 then it shows prime no
@katelibra
@katelibra 4 года назад
500 k congrats
@user-kk3og2it7y
@user-kk3og2it7y 2 дня назад
Thankyou...
@chitranshishrivastava6109
@chitranshishrivastava6109 3 года назад
Agr koi no. Jo underrood m h or uska is trike s ans n aye jese abhi btaya h to kya krenge sir??
@surbhipaliwal3576
@surbhipaliwal3576 4 года назад
Sir ap bhut shandar pdhate ho 😍😍😍😍😍
@YTSHANKY
@YTSHANKY 4 года назад
Please bring advanced c# course.. i am waiting for months now..
@sairamsingh78
@sairamsingh78 2 года назад
For better time optimization I think u can just break the loop once isPrime becomes 0.
@adityaram7408
@adityaram7408 Год назад
yes
@adityaram7408
@adityaram7408 Год назад
#include int main() { int n; printf("enter number : "); scanf("%d", &n); if (n >= 0) { for (int i = 2; i < n; i++) { if (n == 2) { break; } if (n % i == 0) { printf("not "); break; } } } printf("prime"); return 0; }
@achyutsrivastava8050
@achyutsrivastava8050 3 года назад
0:46 OneNote Mast hai Harry bhai
@0810himanshu
@0810himanshu 2 года назад
I got a problem in this code. This code is showing them also prime number that's perfect square of a prime number. Like 4,9,25,49,121 so on. How to resolve that?
@prabhas2445
@prabhas2445 4 года назад
Please do videos on machine learning
@ser-17-p1v
@ser-17-p1v 2 года назад
not working if we put number (n)=4 .
@walishaikh6433
@walishaikh6433 4 года назад
Congrats bhai for 500k 👌🎉and bhai java ka bada video kab aara hai
@akashrautela8480
@akashrautela8480 4 года назад
sir please tell me what theme you are using ... i love your tutorials please sir answer me🙏
@anantgupta1188
@anantgupta1188 2 года назад
default vs code theme
@pallabbanik5853
@pallabbanik5853 4 года назад
I'm Pallab from Kolkata. I learnt C, C++, python, html, css, js from your playlist. But I need hand written material on python. Is it possible?
@BobbySingh-hu4zu
@BobbySingh-hu4zu 4 года назад
Harry Bhai ek video Google sites par bana do, google sites aur wordpress me difference, etc.
@mfiazzafarzafariqbal9272
@mfiazzafarzafariqbal9272 2 года назад
Sir if we want to print only prime number from 1 to 100 then what we have to do plz tell me
@victorakash1
@victorakash1 4 года назад
Hello bro can you make a series for wordpress web developing
@manavsingh3941
@manavsingh3941 Год назад
Can someone tell in this -> if condition why we didn't wrote (isPrime==1) if(isPrime){ printf("The number %d is a prime number ", num); } else{ printf("The number %d is not a prime number ", num); }
@MizanurRahaman03
@MizanurRahaman03 4 года назад
Yeah i understood..
@anjalisable6536
@anjalisable6536 4 года назад
Samaj aa gya
@arjungadani7320
@arjungadani7320 4 года назад
Request : Python OpenCV Module course
Далее
C Program to Convert Decimal Number to Binary Number
23:45
Reason Why People Fail Learning To Code!
15:14
Просмотров 1,1 млн
РУБИН - ЗЕНИТ: ВСЕ ГОЛЫ
01:03
Просмотров 197 тыс.
Program to check whether a number is Prime or not in C
18:47