Plzz give me answer

1 Answer

Answer :

Here is an algorithm to find the area of a triangle:

Accept the values of the three sides of the triangle (a, b, c).

Calculate the semi-perimeter of the triangle using the formula: s = (a+b+c)/2

Calculate the area of the triangle using the formula: area = sqrt(s(s-a)(s-b)(s-c))

Display the area of the triangle.

This algorithm uses the "Heron's formula" for finding the area of a triangle, which is based on the semi-perimeter of the triangle and the lengths of its sides. The semi-perimeter is simply half of the perimeter of the triangle, and it is used as a way to simplify the formula and avoid having to calculate the perimeter.

Related questions

Description : Write an algorithm to calculate the area of a circle and display the result . Use the formulae A=¶r where ¶ is equal to 3.1416?

Last Answer : 10001/999900

Description : How do you write an algorithm which takes students marks and grades them as follows Mark greater than 60 Pass?

Last Answer : Need answer

Description : How do you write an algorithm to swap the values of x and y using a temporary variable t?

Last Answer : To swap the values of two variables, x and y, using a temporaryvariable t:t = x;x = y;y = t;To implement this algorithm as a function, the variables must bepassed by reference. For efficiency, ... (since C++11). If a type does not support themove semantic, copy semantics will be used instead.

Description : How do you Write a pseudo code algorithm that reads in three values and writes out the result of subtracting the second value from the sum of the first and third values?

Last Answer : Pseudocode means you don't use any actual computer language, so you can be quite informal. Just get the general idea. In this case, for instance:Input number to aInput number to bInput ... a + c - bShow resultYour teacher may have specific requirements for pseudocode; try to incorporate those.

Description : How do you write an algorithm to find the average of five different input numbers?

Last Answer : What is the answer ?

Description : Write the algorithm for restoring division?

Last Answer : Do the following for n times: 1) Shift A and Q left one binary position. 2) Subtract M and A and place the answer back in A. 3) If the sign of A is 1, set q0 to 0 and add M back to A. Where A- Accumulator, M- Divisor, Q- Dividend.

Description : Write down the advantages of Booth’s Algorithm

Last Answer : i. It handles both positive and negative numbers ii. It achieves some efficiency in the number of additions required when the multiplier has a few larger blocker of 1’s

Description : Write an algorithm to determine the given number is odd or even.

Last Answer : Step 1- Start Step 2- Read / input the number. Step 3- if n%2==0 then number is even. Step 4- else number is odd. Step 5- display the output. Step 6- Stop

Description : Write algorithm and draw flow-chart to print even numbers from 1 to 100.

Last Answer : Here's one possible algorithm to print even numbers from 1 to 100: Start with a variable i equal to 1. Check if i is less than or equal to 100. If i is less than or equal to 100 ... and increments `i` by 1. The loop continues until `i` is greater than 100, and the program ends.

Description : Write an algorithm to determine whether a given number is divisible by 5 or not

Last Answer : Here's one possible algorithm to determine whether a given number is divisible by 5 or not: Start by taking the input number. Check if the last digit of the number is either 0 or 5. If the ... The above two algorithms are basic ways of checking whether the given number is divisible by 5 or not.

Description : Write down Cyrus-Beck line clipping algorithm.

Last Answer : Step 1: Read end points of line P1 and P2. Step 2: Read vertex coordinates of clipping window. Step 3: Calculate D = P2 - P1. Step 4: Assign boundary point b with particular edge. Step 5: Find ... parametric equation of line P1P2. Step 12: Draw line segment P(tL) to P(tU). Step 13: Stop.

Description : Write down Cohen-Sutherland Line clipping algorithm.

Last Answer : Step 1: Scan end points for the line P1(x1, y1) and P2(x2, y2) Step 2: Scan corners for the window as (Wx1, Wy1) and (Wx2, Wy2) Step 3: Assign the region codes for endpoints P1 and P2 by ... if any of the end point of it appear outside the window. Step 8: Draw the remaining line. Step 9: Exit

Description : Explain and write steps for DDA line drawing algorithm. 

Last Answer : This algorithm generates a line from differential equations of line and hence the name DDA. DDA algorithm is an incremental scan conversion method. A DDA is hardware or software used for linear interpolation of variables over ... : Steps 1: Read the end points of line (x1,y1) and (x2,y2).

Description : Write a Program in ‘C’ for DDA Circle drawing algorithm

Last Answer : #include<stdio.h> #include<conio.h> #include<graphics.h> #include<math.h> void main() { int gdriver=DETECT,gmode,errorcode,tmp,i=1,rds; float st_x,st_y,x1,x2,y1,y2,ep; initgraph(& ... =y2; }while((y1-st_y)<ep || (st_x-x1)>ep); getch(); }

Description : Write the midpoint subdivision algorithm for line clipping.

Last Answer : Step 1: Scan two end points for the line P1(x1, y1) and P2(x2, y2). Step 2: Scan corners for the window as (x1, y1) and (x2, y2). Step 3:Assign the region codes for ... 5 for both subdivided line segments until you get completely visible and completely invisible line segments. Step 6: Exit.

Description : Rephrase the Bresenham’s algorithm to plot 1/8th of the circle and write the algorithm required to plot the same.

Last Answer : The key feature of circle that it is highly symmetric. So, for whole 360 degree of circle we will divide it in 8-parts each octant of 45 degree. In order to that we will use Bresenham's Circle Algorithm for calculation of the ... Call Putpixel (Y + h, -X - k). Call Putpixel (-Y + h,-X + k).

Description : Write DDA Arc generation algorithm.

Last Answer : 1. Read the centre of curvature, say(x0,y0) 2. Read the arc angle, say Ɵ 3. Read the starting point of the arc, say(x,y) 4. Calculate dƟ dƟ=min(0.01,1/3.2*(|x-x0|+|y-y0|))) 5. Initialize angle = 0 6. ... Plot(x,y) x=x-(y-y0) *dƟ y=y-(x-x0) *dƟ Angle =Angle + dƟ } 7. stop

Description : Write an algorithm and draw the flowchart to find sum of series of numbers. 

Last Answer : Algorithim to find sum of series of numbers: 1. Initialize data segment 2. Initialize byte counter and memory pointer to read number from array. 3. Initialize sum variable to 0 4. sum=sum+number from array ... Decrement byte counter 9. If byte counter=0 then step 10 else step 4 10. Stop

Description : Write an algorithm to subtract two 16 bit numbers (With borrow) in 8086 microprocessor.

Last Answer : Algorithm for 16 bit numbers subtraction with borrow: 1. Load 0000H into CX register (for borrow) 2. Load the first number into AX(accumulator) 3. Load the second number into BX register 4. Subtract ... . Move data from AX(accumulator) to memory 8. Move data from CX register to memory 9. Stop