How to use inbuilt gcd STL function.?

here is my code

Hey @Anku47, you can use __gcd(a,b) don’t forget to include appropriate header file (or simply use #include<bits/stdc++.h>).
Hope this helps.

thanks. as you told that to use #include<bits/stdc++.h>).
i have heard about this but not studied or learnt about it yet. in which topic of cpp launchpad course will we learn about it?

1 Like