Here's a simple pseudo code to calculate the area of a triangle given two sides and the included angle:
START
INPUT sideA
INPUT sideB
INPUT angleC // angle in degrees
area = 0.5 * sideA * sideB * SIN(angleC)
OUTPUT area
END
This assumes you have a function to convert the angle to radians if necessary, as most programming languages require angles in radians for the sine function.
#include <stdio.h> main() { int r,b,h; printf("Enter the value of Base and Hight"); scanf("%d%d",&b,&h); r = ((b*h)/2); printf("Area of Triangle=%d",r); }
//Written in C++. ALFRED OMONDI ORIMBO (orimbo@gmail.com)# include# includeusing namespace std;void main(){double s,a,b,c,area;couta;coutb;coutc;s=(a+b+c)/2;area = sqrt(s*(s-a)*(s-b)*(s-c));cout
Here's a simple pseudo-code for basic stack operations: initialize stack push(value): if stack is full: print "Stack Overflow" else: stack[top] = value top = top + 1 pop(): if stack is empty: print "Stack Underflow" return None else: top = top - 1 return stack[top] peek(): if stack is empty: print "Stack is empty" return None else: return stack[top - 1] This pseudo-code includes functions for pushing a value onto the stack, popping a value from the stack, and peeking at the top value without removing it.
what is the diference betwean calculated and maesured value
input number print number + 1
to find the range of values of triangle. Add the value of the sides of the given sides...is it?
It depends on what y is.
The lengths of the 3 sides of a certain triangle are related as shown below, where n is the length of the shortest side of the triangle.0.5n, 1.5n, 2.5nWhich of these name the lengths of the sides for another triangle, similar to the first triangle, for any value n ≥ 1?
The answer depends on the information that you do have. There are many different methods.
#include <stdio.h> main() { int r,b,h; printf("Enter the value of Base and Hight"); scanf("%d%d",&b,&h); r = ((b*h)/2); printf("Area of Triangle=%d",r); }
According to the Pythagorean theorem, the square of the hypotenuse of a right triangle is equal to the sum of the squares of the other two sides or, c^2 = a^2 + b^2. Since there is no single value where a = b= c, a right triangle cannot have all equal sides.
That will depend on other values of the triangle because a triangle has 3 sides and 3 interior angles that add up to 180 degrees
If you know only the base and height, you have two unknown sides and it is not possible to calculate the perimeter. The perimeter can have any value greater than or equal to 5+sqrt(89) cm.
You define a function with an return value. The return value would be the area of the triangle, and the parameters are the width/length and height of the triangle. Inside the function you would define how you would calculate the area, and then return the result.
If these are sides of a triangle then AC can have any value in the interval (3, 13).
The measure of the sides of the triangle is 12x +2, 13x +1 and x-15. Give the value of each side.
No. No Triangle exists where the sum of 2 sides of the triangle is either equal to the third side or is less than the third side.Even, if we consider Right-Angled Triangle, then according to Pythagoras Theorem, c2= a2+b2, where c=Hypotenuse, a and b are the other 2 sides of the triangle. Now, if we consider the minimum +ve value of a and b which is greater than 0, i.e, if we consider a = 1 unit and b = 1 unit, then the value ofc = square-root of (1^2 + 1^2) = square-root of (1 + 1 ) = square-root of (2) which is < than the sum of the value of side a and b. Since the value of square-root is additive in nature, for any +ve value of a and b, this result stands true.Hence, The Triangle Inequality Theorem states that the sum of any 2 sides of a triangle must be greater than the the measure of the third side. This rule must be satisfied for all 3 permutations of the sides. In other words, as soon as you know that the sum of 2 sides is less than the measure of a third side, then you know that the sides do not make up a triangle .Regards,Suvarthi DasBirati, Kolkata-81