Suresh is drawing a flowchart to calculate area of a triangle. Which box does he Application based questions. need to: (i) Read the sides of the triangle (ii) Calculate the area (iii) Show the value of area of the triangle
please answer fast
Answers
Answer:
The complete question is to write algorithm and draw flow chart to print area of triangle using hero's formula?
The flowchart has three steps they are input, processing and output.
1) INPUT:-- we need a, b, c (3 variables) as sides of triangle as input.
2) PROCESSING:-- need to calculate area of our triangle.
3) OUTPUT:-- we need to print value of area of triangle.
The algorithm may be as follow:--
1) Read a
2) Read b
3) Read c
4) If a, b, c is >0 then;
Set s=a+b+c/2
Set area=[s(s-a)(s-b)(s-c)]^1/2
5) Write area
6) Exit.
Explanation:
Answer: - (i) Data box.
(ii) Process box.
(iii) Data box.
Detailed answer: -
Suresh is drawing a flowchart to calculate area of a triangle, then he should use: -
(i) Data box to read the sides of the triangle.
(ii) Process box to calculate the area of the triangle.
(iii) Data box to show the value of area of the triangle.
Therefore,
Suresh needs to use two types of boxes, the Data box and Process box and join then using flow lines while drawing a flowchart.
The boxes used to draw a flow chat are: -
Terminal box - The oval shaped box in which start and end for the program is written.
Data box - The parallelogram shaped box which is used to write input and the output of any program while drawing flowcharts.
Process box - The rectangular shaped box that is used to write the main logic of the program while drawing a flowchart.
Decision box - The rhombus shaped box that is used to write if and or conditions.
The flow lines are used to join the boxes in a flowchart.
Algorithm to find the area of the triangle will be: -
Start
Input side1, side2, side3
Calculate s = (side1 + side2 + side3) / 2
Calculate area = sqrt {s * (s - side1) * (s - side2) * (s - side3)}
Print "Area of Triangle=" area
End
To know more about the topic, visit the below links: -
https://brainly.in/question/8312744
https://brainly.in/question/13881774
#SPJ3