I have to find factors of 1-10 then count all factors and find if they are odd/even. I know how to find if they are even or odd i just can't count how many factors for each number.

#include <iostream.h>

#include <stdlib.h>

int main()

{

int num, icntA, icntB, icntC, sub = 0.0;

int total = 0.0;

cout << "Please enter a positive maxiumum integer value you wish to find divisors: \n";

cin >> num;

for(icntA = 1; icntA <= num; icntA++)

{

for(icntB = 1; icntB <= num; icntB++)

{

if(icntA % icntB == 0)

cout << icntB << " " ;

}

sub = ( icntB/icntB);

total = total + sub;

cout << endl;

}

cout << "total of open: "<< total << endl;

system("pause");

return 0;

}

thank you for any help