0 Bewertungen0% fanden dieses Dokument nützlich (0 Abstimmungen)
13 Ansichten2 Seiten
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.
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.
Copyright:
Attribution Non-Commercial (BY-NC)
Verfügbare Formate
Als DOCX, PDF, TXT herunterladen oder online auf Scribd lesen
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.
Copyright:
Attribution Non-Commercial (BY-NC)
Verfügbare Formate
Als DOCX, PDF, TXT herunterladen oder online auf Scribd lesen