Answer:
Python:
count = 0
while count <= user_num:
print(count)
count += 1
JavaScript:
let count = 0
while (count <= user_num) {
print(count)
count++
}
Explanation:
Not sure what language you asked for, but I wrote it in Python and JavaScript. Make sure to indent for the python one.