Your friend Nazmul must be in the same computing class.
Let's look at what your program actually does.
It gets an integer "a" from the user.
For each integer i from 1 to 100, it divides a by i and rounds down to the nearest integer, and calls the result b.
Then, each time, it calls the routine, factor(b). This divides b by each number from 1 to 100 and displays ..... something.
Is that what you wanted to do?
Where is your routine for checking whether a number is prime? How does your program actually tell if a number is a factor or not? Or does it just blindly divide through regardless of whether it is dividing by a factor or not.
When writing a program like this, you need to think about what steps your program is going to need to undertake, before writing the code.
E.g:
for each factor of the number a, if the factor is prime, display the factor and divide the number by that factor and go again, until we have only 1 left.
Hope that helps.
Bill.