heyy all..I am really confused on the MOD (%) operator and how it is processed..
int n;
cout << "Enter n: ";
cin >> n;
for (int i=1; i<=n; i=i+1)
if ( (i % 2) == 0) //even
cout << "-";
else //odd
cout << "^";
What exactly is going on with the %..I want to understand the way that the computer processes that..I have no idea how to use it.
thankssss