Program to find HCF & LCM of two numbers in C | #6 Coding Bytes

  Рет қаралды 92,535

FACE Prep

FACE Prep

4 жыл бұрын

In this video, we will discuss the logic to find out LCM & HCF of two given numbers in C. If you want to know the solution to calculate LCM & GCD of given numbers in C++, Java and Python then check out the below links.
1) LCM of two numbers, LCM using GCD - bit.ly/2kM7Y4m
2) GCD of two numbers, GCD using Recursion - bit.ly/2mfvB5C
For more programming questions, check out this link - bit.ly/must-practice
Also, to receive placement preparation tips and placement related updates on TCS, Accenture and various other companies. Come join the largest community on FACE’s Telegram and WhatsApp, and take your placement preparation to the next level.
Join here:
Telegram: t.me/faceprepoffcl
WhatsApp: bit.ly/2MgoYMR

Пікірлер: 61
@rameshwarkurmi3504
@rameshwarkurmi3504 4 жыл бұрын
आपका पढ़ाने का तरीका बहुत ही अच्छा है बहुत ही शानदार है हमारी आपके साथ शुभ कामना है कि आप सभी की इसी तरह मदद करें और आप भी बहुत आगे जाएं
@krishnabhagat2716
@krishnabhagat2716 4 жыл бұрын
Yup you have save my lots of time in single video. Thanks nice work .
@utkarsapilla6180
@utkarsapilla6180 3 жыл бұрын
HCF 3min video lcm 3min video . Here 9 min video...3min of your precious time got wasted? Sed!
@sukhendubhattacharjee6845
@sukhendubhattacharjee6845 3 жыл бұрын
Extremely helpful.. thanx for this vdo
@tusharfromearth
@tusharfromearth 3 жыл бұрын
....How did your code compile ? int "i" is not declared... is it c Compiler only or some other compiler ?
@FACEPrep
@FACEPrep 3 жыл бұрын
Yes originally i was not declared and it did throw an error, then i was initialized and compiled. Correcting the error was not shown in the video.
@harhar260
@harhar260 2 жыл бұрын
You guys are my saving grace!!!!!THANK YOU!
@FACEPrep
@FACEPrep 2 жыл бұрын
Welcome!
@rishabhgupta5460
@rishabhgupta5460 4 жыл бұрын
Please if possible then make a tutorial for pattern printing complex patterns two patterns together it will be very helpful for us . Thankyou
@FACEPrep
@FACEPrep 4 жыл бұрын
Hi, we will soon make videos on pattern printing. However, you can also have a look at this for practice - www.faceprep.in/pattern-programs-in-c/
@HomeNetwork404
@HomeNetwork404 3 жыл бұрын
Tomorrow is my mid-sen and I'm watching this....😅😅😅
@sarcastic350
@sarcastic350 6 ай бұрын
Bhai 9 bje est hai or 8.30 pe ye video dekh rha hu
@rupesh6363
@rupesh6363 4 жыл бұрын
Thanks
@darshan_the_admin
@darshan_the_admin Жыл бұрын
Thank you so so much
@anilkumarkarri3978
@anilkumarkarri3978 2 жыл бұрын
good video mam tq ...
@vandanamallareddy8470
@vandanamallareddy8470 3 жыл бұрын
Nice explanation
@vivek5807
@vivek5807 2 жыл бұрын
Thank you very mych
@ESSharath
@ESSharath 4 жыл бұрын
Wonderful logic 👍👍
@bloodsucker1298
@bloodsucker1298 2 ай бұрын
So far best explanation
@Coder_421
@Coder_421 3 жыл бұрын
Explanation and coding is entire different
@rutikwankhade337
@rutikwankhade337 4 жыл бұрын
Hey faceprep, please upload more videos on these type of topics. I watched so many videos but This playlist is best on youtube. Need more content please.
@FACEPrep
@FACEPrep 4 жыл бұрын
Thank You for all the love. We will upload very soon.
@adityakanakamalla8979
@adityakanakamalla8979 4 жыл бұрын
lcm and gcd for array how it will be?..can u explain
@karnika216
@karnika216 3 жыл бұрын
i is not declared and still the program got compiled,.... How?
@adityathakur8951
@adityathakur8951 Жыл бұрын
Lol sis 🤣😂
@sjeeva7402
@sjeeva7402 4 жыл бұрын
Pls make a video for printing difficult patterns..
@FACEPrep
@FACEPrep 4 жыл бұрын
Hi, we will soon make videos on pattern printing. However, you can also have a look at this for practice - www.faceprep.in/pattern-programs-in-c/
@needtime2change706
@needtime2change706 2 жыл бұрын
In that case if u take i value as 2 mean u will get the crt answer because by 1 both value will divise
@pritamparali2793
@pritamparali2793 2 жыл бұрын
mam why are we taking minimum value among n1 and n2 ???? that thing didnot clear
@yamiprincess
@yamiprincess 8 ай бұрын
That voice is amaaaazinnngggg
@raihanrony1810
@raihanrony1810 3 жыл бұрын
aren't all N>1 numbers divisible by i=1. so gcd is gonna be 1 every time
@raveenak8581
@raveenak8581 3 жыл бұрын
Because in this for loop, we don't use break statement. So that i=1 will iterate till the last (greatest) i value that satisfies n1%i==0 && n2%i==0.
@annemarydavid8620
@annemarydavid8620 2 жыл бұрын
@@raveenak8581 Thank u🤗🥰
@amirshaikh2458
@amirshaikh2458 3 жыл бұрын
Can you please explain me this logic how it works for and if condition for find GCM
@FACEPrep
@FACEPrep 3 жыл бұрын
Can you please elaborate on GCM
@it_91_vaibkhare20
@it_91_vaibkhare20 4 жыл бұрын
Your program took more time than expected. Expected time limit
@YuvrajSingh-bj2jh
@YuvrajSingh-bj2jh 4 жыл бұрын
long gcd(long a,long b){ if(a==0) return b; else return gcd(b%a,a); } int main() { //code int t; cin>>t; while(t--){ long a,b; cin>>a>>b; long hcf=gcd(a,b); long lcm=(a*b)/hcf; cout
@aquax-50
@aquax-50 3 ай бұрын
How to use this loop in a function
@mahendrazode7104
@mahendrazode7104 2 жыл бұрын
Thank you but font size is very little
@FACEPrep
@FACEPrep 2 жыл бұрын
Thanks for your feedback. We'll consider it.
@allinne2177
@allinne2177 3 жыл бұрын
I think everytime for every number the code will not work properly
@prajwalnegi22
@prajwalnegi22 3 жыл бұрын
i understood the logic but this video was totally useless for me, because i thought youwere going to teach the code, cus I already knew the logic btw thanks anyways
@surajnath5148
@surajnath5148 4 жыл бұрын
How to calculate large power e.g 200^200 in c
@surajnath5148
@surajnath5148 4 жыл бұрын
@@tejask5417 no it doesn't work.
@srijavalikotha7686
@srijavalikotha7686 8 ай бұрын
@@surajnath5148 by using pow function in c and u need to include math.h heterfile also.
@VIVEKKUMAR-pe3ou
@VIVEKKUMAR-pe3ou 4 жыл бұрын
plz can u explain gcd = i i have not understand
@FACEPrep
@FACEPrep 4 жыл бұрын
If the two numbers are completely divisible by i, then gcd will become i. That is what it indicates.
@yeswamthlepuru3068
@yeswamthlepuru3068 3 жыл бұрын
What's happens when there exists more than one number
@crazy_stanle
@crazy_stanle 3 жыл бұрын
@@yeswamthlepuru3068 then use break
@sujanreddy7396
@sujanreddy7396 2 жыл бұрын
Program is not getting executed
@anshukumaryadav6387
@anshukumaryadav6387 3 жыл бұрын
madam i declear to kr digye
@Ashutoshchauhan1
@Ashutoshchauhan1 Жыл бұрын
Ma'am hindi me bolte to aur acche se samajh me aataa 😶
@bengalispiritual3687
@bengalispiritual3687 4 жыл бұрын
Isme output galat a raha hei
@FACEPrep
@FACEPrep 4 жыл бұрын
Hi, The output is exactly right. Kindly go through the video or let us know your question in detail.
@sonykumari121
@sonykumari121 3 жыл бұрын
Saf dikhta ny hai mam
@AbhishekGupta-pj7vz
@AbhishekGupta-pj7vz Жыл бұрын
Mene video kholi because I got a little crush on her 😁🤫🤪
@himanshukrdiwedi4554
@himanshukrdiwedi4554 7 ай бұрын
Not good
@sheygabit9641
@sheygabit9641 2 жыл бұрын
I think your explanations are too fast
@FACEPrep
@FACEPrep 2 жыл бұрын
Thank you for your feedback. We'll consider it.
🤔Какой Орган самый длинный ? #shorts
00:42
Program to Find LCM and HCF/GCD in C (HINDI)
21:17
easytuts4you
Рет қаралды 279 М.
HCF/GCD of Two numbers Using Python
15:21
CodeWithHarry
Рет қаралды 68 М.
Program to calculate HCF of two numbers in C language
14:39
MySirG.com
Рет қаралды 181 М.
C Program To Find GCD and LCM of Two Numbers
4:15
Technotip
Рет қаралды 50 М.
Program to calculate LCM of two numbers in C language
20:36
MySirG.com
Рет қаралды 221 М.
Solve Any Pattern Question With This Trick!
57:20
Kunal Kushwaha
Рет қаралды 2,3 МЛН
C Program to Find LCM of Two Numbers
3:27
Technotip
Рет қаралды 44 М.