I had the problem to reverse the digits and I searched and found the answer, but I was wondering as to what is the fuction of the "%"
I was playing with it when changing values of 10 to 100 and 1, but is it a math formula or something else?

Recommended Answers

All 2 Replies

% is the Modulo function. It gives you the remainder of a division between two numbers. Its an operator in C and C++.

% is modulo division operator in c. it works on two numbers and evalutes the remaining value after dividing.
for example 10%3 = 1
10%4 = 2

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.