(8. The program fragment below shows the way to calculate the area of an ellipse. Based on Figure Q8a, ellipse area = x a x b; where n= 3.14159, %3D a = major axis and b=minor axis. Answer the...


(8.<br>The program fragment below shows the way to calculate the area of an<br>ellipse. Based on Figure Q8a, ellipse area = x a x b; where n= 3.14159,<br>%3D<br>a = major axis and b=minor axis. Answer the following questions based<br>%3D<br>on this program.<br>a<br>Ellipse Area = a xaxb<br>Figure Q8a<br>

Extracted text: (8. The program fragment below shows the way to calculate the area of an ellipse. Based on Figure Q8a, ellipse area = x a x b; where n= 3.14159, %3D a = major axis and b=minor axis. Answer the following questions based %3D on this program. a Ellipse Area = a xaxb Figure Q8a
Computer Programming: Exercise Module<br>SOURCE CODE<br>1.<br>#include <iostream><br>2.<br>using namespace std;<br>3.<br>-a-<br>4.<br>float calcArea (float, float);<br>5.<br>float PI = 3.14159;<br>6.<br>7.<br>int main ()<br>8.<br>9.<br>float a, b, area;<br>cout <« This program calculates the area of an ellipse \n\n,<br>10.<br>11.<br>cout <« > axis; 28. ; |/ Return axis value -e- 29. 30. 31. float calcArea ( -f- 32. 33. return PI*a*b; // Return area value 34. "/>
Extracted text: Computer Programming: Exercise Module SOURCE CODE 1. #include 2. using namespace std; 3. -a- 4. float calcArea (float, float); 5. float PI = 3.14159; 6. 7. int main () 8. 9. float a, b, area; cout <« this="" program="" calculates="" the="" area="" of="" an="" ellipse="" \n\n,="" 10.="" 11.="" cout=""><« "enter="" the="" major="" axis="" of="" the="" ellipse:="" ";="" 12.="" get="" major="" axis="" from="" function="" -b-="" 13.="" 14.="" cout=""><« "enter="" the="" minor="" axis="" of="" the="" ellipse:="" ";="" 15.="" get="" minor="" axis="" from="" function="" 16.="" b="-c-" 17.="" 18.="" calculate="" area="" from="" function="" 19.="" area="-d-" 20.="" cout=""><« "the="" area="" is="" "="">< area="">< endl;="" 21.="" return="" 0;="" 22.="" 23.="" 24.="" float="" getaxis="" ()="" 25.="" {="" 26.="" float="" axis;="" 27.="" cín="">> axis; 28. ; |/ Return axis value -e- 29. 30. 31. float calcArea ( -f- 32. 33. return PI*a*b; // Return area value 34.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here