Technology has advanced to the point where programming has become an essential part of our lives. We use software and applications for communication, entertainment, education, and work, and these are all built on programming languages.

Program to find area and perimeter of rectangle.



Explanation
Here, length and breadth of rectangle are inputted by user and placed in l and b using scanf. Using the correct formula of area and perimeter, we are able to generate the output. The area and perimeter anre float and the output should be of 2 decimal value, so we have used .2f  specifier.

Output
Here the input length and breadth is provided separated by comma as specifier used in scanf.

Exercise:

Find the area of circle where PI=3.1458.
Share:

No comments:

Post a Comment

If you have any doubt, let me know...

Translate

Wikipedia

Search results