There are a number of things wrong with this, but since you don't tell us what problem you notioced, we can start with the most basic:
Response.Write("k++");
perhaps if you remove the quotes it would help?
Response.Write(k++);
Then, let's just fix something else as well: This is a web site, so "\n" won't work. Try
Response.Write("<br />");
Instead...