hi guys
so i developed this piece of code to help me find a co prime of a number.
basically it just a fancy way of finding a number between 1 and itself, that is a prime number and not a factor of that number
here is the code
any help is appreciated
thanks in advance =)Code:int finde(int phi){ int e =4; int resultprime; resultprime = IsPrime(e); while(e<phi){ resultprime=IsPrime(e); if(resultprime==1){ if((e%phi)!=0){ return e; break; } e++; } } }