I want to make program for verifying huckels rule, which will tell whether the compound is aromatic or not based of electrons.
Rule is like if the compound has (4n+2) pi electrons in delocalized orbit, where n=1,2,3,4..., Then the compound is aromatic. I can create a input where user will enter number of pi electrons, but what about the numerical condition? I programmed that if a is no. of electrons entered, how do I code for is "a" equal to 4n+2 where n is 1,2,3,4... ? In CPP and python?