Hello all,

I am a new member to this forum. I am learning C programming language here in my local place. I want to know how a while loop is written. I have been given a simple assignment to be done that is "to print even numbers from 1 to 50 using while loop." I am not looking out for a quick fast solution, however I would like someone from this forum to guide me on how to go about this problem. This would indeed help me in proceeding further. Expecting a positve reply.

Recommended Answers

All 2 Replies

Begin with
while ( number <= 50 )

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.