Pages

Sunday, May 19, 2013

Calculate the Area of a Rectangle in DFD


DFD is a simple flowchart editor and simulator program.

To calculate the area of a rectangle is implement the formula a = b * h. Where a is the area, b is the base and h, the height. To run this program we'll use the program DFD. You can download it from hereNote: The software language is Spanish.

First the variables "b" and "h" will be read, as shown in the right image, in a Read object.

Then we'll assign to the "a" constant the resulting value of the operation "b * h". In an Assign object.

Finally in an Output object the value of "a" will be printed.


0 Comments:

Post a Comment