Can any one please explain the for statement in this code, I understand the initialization of i=2 and the increment of i=i+1, but I dont understand the conditional test of i<(num/2)+1. The program displays all the factors of a number entered by the user. I don't understand why you need the +1 and the num/2. Thanks
#include <stdio.h>
int main()
{
int num, i;
printf("Please enter number: ");
scanf("%d", &num);
for(i=2; i<(num/2)+1; i=i+1)
if((num%i)==0) printf("%d\n", i);
printf("Terminating\n");
return 0;
}