0% found this document useful (0 votes)
67 views1 page

Include Void Main (Double Area - of - Triangle Cout Base - Height Area - of - Triangle Base Height 0.5 Cout " The New Area Is" Area - of - Triangle )

This C++ program asks the user to input the base and height of a triangle, calculates the area by multiplying those values by 0.5, and displays the resulting area. It takes in two double values for the base and height, calculates their product divided by two to get the area of a triangle, and prints out the calculated area.

Uploaded by

Nazrin Manshor
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views1 page

Include Void Main (Double Area - of - Triangle Cout Base - Height Area - of - Triangle Base Height 0.5 Cout " The New Area Is" Area - of - Triangle )

This C++ program asks the user to input the base and height of a triangle, calculates the area by multiplying those values by 0.5, and displays the resulting area. It takes in two double values for the base and height, calculates their product divided by two to get the area of a triangle, and prints out the calculated area.

Uploaded by

Nazrin Manshor
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 1

include <iosteram.

h>

void main ( )
{

Double area_of_triangle;
cout<<" Enter base, height;

cin>> base_height;

area_of_triangle= base* height* 0.5

cout<<" The new area is"<< area_of_triangle;

You might also like