Computer Applications
Write algorithms and draw flowcharts for the following:
Accept the length of two different line segments and check whether they are equal or unequal. Display the message accordingly.
Algo & Flowcharts
335 Likes
Answer
Algorithm
Step 1: Start
Step 2: Accept the length of the two line segments as l1 and l2.
Step 3: If l1 and l2 are equal, then display 'Line Segments are equal'.
Step 4: If l1 and l2 are not equal, then display 'Line Segments are not equal'.
Step 5: Stop
Flowchart

Answered By
240 Likes
Related Questions
What is an algorithm? What are its characteristics?
Define the following and draw their symbols:
(a) Process Box
(b) Terminal Box
(c) Input/Output Box
(d) Decision Box
Write algorithms and draw flowcharts for the following:
Accept the age of a person and check whether he/she is eligible to vote or not. A person is eligible to vote only when he/she is 18 years or more.
Write algorithms and draw flowcharts for the following:
Accept three numbers and check whether they are 'Pythagorean Triplets' or not. Display the message accordingly.
(Hint: Use Pythagoras Formula for a Right-angled Triangle: h = p2+b2)