Hello, I'm new to C++.

How do I find the sum of integers from a through b, no input from user needed, and only using while loop statement.

The results from my question on the internet gave me only the solution using for loop statement.
Can anyone show me how to do it?

Always share your work so far so we can see what you are trying and maybe there's a quick explanation that can help.

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.