I'm getting bored on this summer break, so I tried to do this small C programming question from a university.

The goal of the program is simple: Show all factors of a given number. However, i can't seem to completely do the right thing. Here's what i've already written:


If someone has any idea on where I might have done wrong, please let me know. I'm trying to figure it out myself at the moment