Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Area of a square


1. Area of a square
The following example program takes as input the width and height of a square and outputs the area of that square.

Programmer facing: Notice how declarations, input (and echo), process, and output are separated (with comments).

User facing: Notice how the output separates the input and output with a blank line. Here is the C code.


2. Examples of input and output
Here are some examples of input and output for the above program code.

Here is an example input.

For the above example input, here is the expected output.

Here is an example input.

For the above example input, here is the expected output.

Here is an example input.

For the above example input, here is the expected output.


3. End of page