We also demonstrate how to "stack" and "nest" control statement to solve problems.
The chapter concludes with an introduction to the Visual Studio debugger.
Compound-assignment operators perform the operation specified by the additional operator, then assign the result to the left operand.
For example, a compound-assignment expression such as twice: in the addition operation and in the assignment operation.
"short y =1; y = y 1;" doesn't compile is because of the so called Binary Numeric Promotion.
For y = y 1, is int, so y is converted to an int, the result of y 1 is also of type int.
Before writing a program to solve a problem, you should have a thorough understanding of the problem and a carefully planned approach.
In this chapter, you will learn the theory and principles of structured programming with control statements.
As always, all of the code snippets mentioned in this article can be found in our Git Hub repository.
When you sign in to comment, IBM will provide your email, first name and last name to DISQUS.