Built-In gcd() Greatest Common Divisor Function | C++ Tutorial

  Рет қаралды 7,819

Portfolio Courses

Portfolio Courses

Күн бұрын

Пікірлер: 9
@greyforget6916
@greyforget6916 7 ай бұрын
Thank you so much, short and clear!
@XYZ-353
@XYZ-353 Жыл бұрын
Just got what I was looking for.Thanks💙
@PortfolioCourses
@PortfolioCourses Жыл бұрын
Awesome, I'm glad this video was helpful for you, and you're welcome! :-)
@youngboii6393
@youngboii6393 Жыл бұрын
I want to ask why I declared but still not using GCD , I am using Visual Studio 2012 and 2020 , it doesn't work on both. Thanks for the reply
@PortfolioCourses
@PortfolioCourses Жыл бұрын
It depends on the version of C++ that Visual Studio 2012 and 2020 are using. C++ has different versions like C++14 and C++17, unless you are using C++17 and onwards then gcd will not work. The original code for the video is here: github.com/portfoliocourses/cplusplus-example-code/blob/main/gcd.cpp. You might be able to configure Visual Studio to use C++17: stackoverflow.com/questions/41308933/how-to-enable-c17-compiling-in-visual-studio. Though last time I read about it, I saw that Microsoft does not fully support all C++17 features necessarily, but perhaps that has changed by now. :-)
@youngboii6393
@youngboii6393 Жыл бұрын
@@PortfolioCourses I really appreciate you, thanks for giving me the answer, I was crazy about GCD hahaha . Hope your channel grows more and more. PEACE
@PortfolioCourses
@PortfolioCourses Жыл бұрын
@@youngboii6393 You're welcome! 🙂
@blackpinksjisooonumber1fan185
@blackpinksjisooonumber1fan185 2 жыл бұрын
hello i just wanted to ask how can we use gcd in real life??
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
Any situation where you want the greatest common divisor of two numbers. :-) There are some answers in the first couple search results here: www.google.com/search?client=firefox-b-d&q=gcd+in+real+world. e.g. it comes up in different algorithms.
Handling String Input With Spaces | C++ Tutorial
3:45
Portfolio Courses
Рет қаралды 38 М.
Why You Shouldn't Nest Your Code
8:30
CodeAesthetic
Рет қаралды 2,8 МЛН
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 93 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 96 МЛН
how Google writes gorgeous C++
7:40
Low Level
Рет қаралды 951 М.
String In Char Array VS. Pointer To String Literal | C Programming Tutorial
9:58
GCD - Euclidean Algorithm (Method 1)
14:38
Neso Academy
Рет қаралды 593 М.
you will never ask about pointers again after watching this video
8:03
C Program to calculate gcd of two numbers using recursion
10:34
Sudhakar Atchala
Рет қаралды 74 М.
GCD of two numbers using Function Part 2
8:42
Sonali Suryawanshi
Рет қаралды 12 М.
Beginners Should Think Differently When Writing Golang
11:35
Anthony GG
Рет қаралды 123 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 93 МЛН