program to print natural numbers only by single variable

Hello anveshnara... looks like you are a new member.

Based on your question, you should know that generally members post questions, code examples, and any errors they encountered. No one here is going to do work for you without you showing some type of effort.

Post what you have done so far and what you need help with.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.