what does this sytax /statement mean
if( r>=0 && r<=5){
rating =r;
}

If you do not know this basic stuff then that is really bad...

Anyway, if "r" is greater OR equal to zero AND "r" is smaller OR equal to file then value of "r" will be assigned to "rating" variable. So only numbers 0,1,2,3,4,5 will return TRUE for this if statement

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.