Questions tagged [triangle]

Triangles are simple, yet fundamental building blocks of many different mathematical fields including trigonometry and geometry.

There are 6 types of triangles including:

  • Equilateral

    All edges are the same length.

    enter image description here

  • Isosceles

    Two edges are the same length.

    enter image description here

  • Scalene

    All edges are different lengths.

    enter image description here

  • Right

    One angle with value of 90 degrees.

    enter image description here

  • Obtuse

    One angle with value greater than 90 degrees.

    enter image description here

  • Acute

    All angles with value less than 90 degrees.

    enter image description here

126 questions
-2
votes
1 answer

Finding third side of triangle using law of cosine. python

For some reason the answer I get in the program is 7.091341682475861 It is supposed to be 6.66634. Can someone please explain to me what I am doing wrong. The equation is fairly simple and straightforward? import math as mt def third_side(a, b,…
user3316598
  • 163
  • 1
  • 7
-3
votes
2 answers

printing triangle using recursion in c without loop or multiplication

I'm supposed to print a triangle int tri(int rows) in c using recursion without multiplication or loops. The triangle should have one * in the 1st row, two ** in the 2nd row, three *** in the 3rd row and so on... here's what I tried and what seems…
Leyla
  • 1
  • 3
-3
votes
1 answer

kotlin does wrong equations. it does not calculate correctly

fun main(args: Array) { val pie = 22/7 println("Enter a number for triangle area") val input = readLine()?: "" val a = input.toInt() * input.toInt() * pie println(a) } here when I input 6 it should give us 113.142857143…
-3
votes
2 answers

Output a string with a new character in each line, forming a right triangle

Trying to output a string that has been assigned to an array, with different characters on each new line, eventually creating a right triangle. But I'm completely stuck. I believe some for loops should be involved to iterate over each character but…
Chris
  • 23
  • 2
-3
votes
1 answer

Change triangle to circle in OpenGL

Many times I tried to change the triangle points to circle in the vertexShader.glsl without a successful outcome. Would I ask you to rewrite the code so that the program draws a circle instead of a triangle? So the vertexShader code: uniform float…
-4
votes
2 answers

C++: Error in login, identify a valid triangle with greater greater then 0, all three angles provided

I have written this program, it passes all manual test conditions but says "wrong answer" when I submit online on an IDE. Constraints 0≤a,b,c≤180 #include using namespace std; int main() { // your code goes here double…
Sina
  • 1
  • 1
1 2 3
8
9