i am trying to make program that checks if the number is a prime or not:
but when i do this asal(9,1)=>it returns 9 implying it a prime numberCode:int asal(int a,int b){ int x; for(x=2;x<a;x++){ if(a%x!=0){return a;} else {return b;}}}
i stared at the code for about 10 min.s couldnt find it so i said good people in c board could help me (i wish)
note(In Turkish(asal)==In English(prime)(note(i am Turkish)))
(i tried make it look like C programming