i cant under stand the counter in the for loop for example in a simplethis program shows N divides how much numbers like if input is 8 then out put is 4 because 8divided by 1,2,4 or 8.Code:#include<iostream.h> #include<conio.h> void main() { clrscr(); int n,count=0; cout<<"enter the intiger"; cin>>n; for(int i=1;i<=n;i++) { if(n%i==0) { count++; cout<<count; } } getch(); }
my question is how can i see the 1,2,4,8 insted of 4.