This document contains code for calculating the area of two shapes - a circle and a triangle. For the circle, the code prompts the user to input a radius, then calculates the area as pi * radius squared and displays the result. For the triangle, the code prompts the user to input a base and height, calculates the area as 0.5 * base * height using the triangle area formula, and displays the result.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
47 views2 pages
Area Circle #Include #Include
This document contains code for calculating the area of two shapes - a circle and a triangle. For the circle, the code prompts the user to input a radius, then calculates the area as pi * radius squared and displays the result. For the triangle, the code prompts the user to input a base and height, calculates the area as 0.5 * base * height using the triangle area formula, and displays the result.