Computing teacher gave me homework to make a program which checks if a number is prime i wrote this:
it returns "its a prime" where is the problem????Code:int asal(int a,int b){ if(b=1){return 2;} else if(a%b!=0){return asal(a,b-1);} else if(a%b==0){return 1;}} int main(){ if(asal(27,26)==2){printf(" is a prime");} if(asal(27,26)==1){printf(" isn't a prime");} getchar(); return 0;}