0

i=2; i<=num/2; ++i

Please explain this entire loop clearly step by step I am not understanding the condition statement this is the c++ number is prime or not program.

25th Sep 2019, 7:52 AM
Dipanjan Basu
Dipanjan Basu - avatar
1 Antwort
0
Variable <i> here is a loop counter. The loop counter is initialized as 2, and the value of variable <i> will be incremented by one on each loop iteration until value of <i> equals <num> / 2. Try to review the lesson on loops, usually it helps.
25th Sep 2019, 8:31 AM
Ipang