Tree Problem

Tree Problem - cin >> Diameter cout...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 /****************************************************************************** Craig Richardson Aria Mavvaji Hyun Shin ******************************************************************************/ #include <iostream> #include <cmath> using namespace std int main() { int Height, Weight double Mean, Diameter, pi=3.1415926 cout << "Enter the diameter of the tree in inches: "
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cin &gt;&gt; Diameter cout &lt;&lt; &quot;Enter the height of the tree in feet: &quot; cin &gt;&gt; Height cout &lt;&lt; &quot;Enter the weight of the tree in tons: &quot; cin &gt;&gt; Weight Diameter = Diameter / 12 Weight = Weight * 2000 Mean = ( Weight / (Height * pow(Diameter, 2) * pi)) M cout &lt;&lt; &quot;The mean number of pounds per cubic foot of the tree is: &quot; &lt;&lt; Mean &lt;&lt;endl return 0 }...
View Full Document

This note was uploaded on 04/14/2008 for the course CSI 1430 taught by Professor Aars during the Spring '08 term at Baylor.

Ask a homework question - tutors are online