Husen's Code
Here I will share my source code
Check for k th bit; I have solved the problem in two ways 1] Using left shift operator (<<); 2] Using right shif…
Read moreComputing Power in c++ powerof(x , n) This function takes log(n) time and auxilury space is big O 1; #include <ios…
Read morePrinting divisor in c++ I wrote the program to print all the divisors of a number... #include <iostream> #includ…
Read morePrime factors using c++ #include <iostream> #include <cmath> int primefactors ( int num ){ if ( nu…
Read moreLCM and GCD in c++ #include <iostream> int gcd ( int a , int b ) { if ( b == 0 ) { retur…
Read more#include <iostream> #include <cmath> int fact ( int N ) { int res = 1 ; for ( int i = 2 ; i…
Read moreCheck for prime in c++ #include <iostream> bool checkprime ( int n ) { if ( n == 1 ) { ret…
Read more
Social Plugin