30.(C).Making friend from Toph

 #include <stdio.h>

/*Byang is going to join a new school. His new class has N students.


Each of the students are identified by their roll numbers starting from 1 to N.

Byang’s roll number will be N.


Byang plans to make friends with only those whose roll numbers are a divisor

of his roll number.


Can you help Byang count how many friends he could potentially make? 

You can assume everyone wants to be Byang’s friend.


Input

The input will contain an integer NN (0 < N < 10000000<N<1000000).*/


int main() {

int N,i,count=0;

scanf("%d",&N);

for(i=1;i<N;i++)

   {

if (N%i==0)

count++;

    }

printf("%d",count);

return 0;

}

/*Output

Print the number of friends Byang will make in his new class.


Sample

Input Output

6

3*/

Comments