Do you not understand what referential transparency is?
You can write "pure" functions in imperative languages. Any function which returns the same result for the same arguments is a pure function. You could write an entire pure functional program in C if you wanted.
You can write "pure" functions in imperative languages. Any function which returns the same result for the same arguments is a pure function. You could write an entire pure functional program in C if you wanted.