We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

for(n=10;n<=b;n++)
checking the value of n is less than b
if(n%2==0)
suppose the value of n you given is 10
if statement will find the remainder by using the modulus %
that is n%2
10%2 just divide the reminder will always be zero which means if its divisible by 2 it is even number..

## For Loop

You are viewing a single comment's thread. Return to all comments →

for(n=10;n<=b;n++) checking the value of n is less than b if(n%2==0) suppose the value of n you given is 10 if statement will find the remainder by using the modulus % that is n%2 10%2 just divide the reminder will always be zero which means if its divisible by 2 it is even number..