If you want the variable to be print on the csv then you need to create a datatable and define the columns name as the variable name and feed all the variable values to the respective columns. Then use write csv activity to create the csv file.
If you want to write it on text pad then use Write Text File activity and write all the variables
ex: firstname + lastname + age.tostring+ so on…