This is my function for finding prime numbers
void print(int num) { for(int i=2; i<num/2; i++) { if(num%i==0) { cout<<"not prime\n"; exit(0); } } cout<<"prime\n"; } My input in num. I'm trying to find the runtime using big oh. I remember that finding the run time had something to do with log.
The worst case would be that my program would run the n/2 -1 times?