Self Check

The questions in this section provide a chance to demonstrate your understanding of the concepts discussed so far.

After reading the material in this chapter, you should be able to answer these questions.

Place these statements in their proper order so that the program prompts for input, computes the area, and displays the results.

Fix this program so that it compiles.

Write a program that accumulates the sum of the numbers 1 - 10 and prints the result.

When assembled in its proper order, the following program segment prints ‘Odd numbers:’ followed by all the odd numbers from 1 - 100, one per line.

Write a program that stores your name in a local variable and then prints it.

You have attempted of activities on this page