So if it calculates the remainder is it that c (even though its char) divided by 7 gives the remainder 0?
In this expression, c%7 == 0 there is nothing to indicate what c is, we can infer from the context that it is some sort of integer type, but it need not be a character. It could just as well be an int.
It takes the integer variable c, finds the remainder when dividing by 7. Then it tests whether that remainder is equal to zero.
Example (using C++)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
usingnamespace std;
int main()
{
for (int c=0; c<50; ++c)
{
if (c%7 == 0)
{
cout << c << " is a multiple of 7\n";
}
}
}
0 is a multiple of 7
7 is a multiple of 7
14 is a multiple of 7
21 is a multiple of 7
28 is a multiple of 7
35 is a multiple of 7
42 is a multiple of 7
49 is a multiple of 7