A Parallelogram is a flat shape with opposite sides parallel and equal in length. The diagonal of a parallelogram divides it into two congruent triangles. So the total area of the Parallelogram is...


A Parallelogram is a flat shape with opposite sides parallel and equal in length. The<br>diagonal of a parallelogram divides it into two congruent triangles. So the total area<br>of the Parallelogram is always twice the area of one of the triangles formed by the<br>diagonal as below<br>A = Vab sin (c)<br>where,

Extracted text: A Parallelogram is a flat shape with opposite sides parallel and equal in length. The diagonal of a parallelogram divides it into two congruent triangles. So the total area of the Parallelogram is always twice the area of one of the triangles formed by the diagonal as below A = Vab sin (c) where, "a" and "b" are the two sides and "c" is the angle in radian. Write a C++ program that computes the area A of Parallelogram by reading its parameters from a text file "input.txt". Each line of the file represents the parallelogram name, the side "a", side "b" and the angle "c" of a Parallelogram, respectively. The program should read each line to compute the area A of each parallelogram. It should also display the total number of computed areas. Your program should implement the following functions: Area(): This function receives the values of "a", "b", and "c" then computes and returns the value of area A. Print(): This function receives the name of Parallelogram and the computed area A then displays on the output screen. The input file and sample output are as shown below: Input File: Sample Output: input - Notepad EASultan\Coursesintroduction to c File Edit Format View Help Area of differnt Parallelograms P1 21 12 e.43 P2 32 43 e.54 P3 54 13 0.79 P4 22 14 e.65 PS 12 33 0.87 6.62 19.07 18.82 P2 P4 PS 10.62 15.21 ....... The total number of computed area is 5 Press any key to continue Winde Ln 6, ( 100

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here