I'm having a brain fart. How would I write the following in c++?
if (x is divisible by 15)

Thanx,

Atrus

if x modulo y equals zero then x is evenly divisible by y. Modulo operator is the % sign. Works only for integer types.

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.