Questions tagged [triangular]

Use this tag when you have a programmatic problem related to coordinates, area, or any other property of a shape that forms a triangle.

The shape formed by a polygon which has three sides is said to be triangular in nature.

Triangular shape has been discussed, analyzed, formed mathematical formulas around, explained in different contexts since the inception of the idea of geometry.

You can read more about triangular shape and it's properties here.

157 questions
-2
votes
1 answer

about triangular rull with functions in python

What's the problem in this code? It looks correct. but outputs are not correct. by the way, (none of them is greater than or equal to the sum of the other two) It's triangular rule... import sys def areTriangular(x,y,z): if x
bkk
  • 81
  • 1
  • 7
-2
votes
1 answer

Read integer 2d matrix from text file

I am stuck into read 2D array from text file, but I couldn't make it. I have tri[][] array data which you see in code. I need read it from text instead of defining in program. And I insert that data into the program. Code: // C++ program for…
-3
votes
1 answer

How to code a two dimensional triangular list in python with the formula of i**2 + j**2?

I am trying to solve this practice problem. a) Prompt the user to enter a value of n = positive integer b) Allocate a 2d triangular list with n rows, first row has length 1, second row has length 2, etc, last row has length n c) Write nested loops =…
user14672805
  • 11
  • 1
  • 3
-3
votes
1 answer

Expressing Natural Number by sum of Triangular numbers

Triangular numbers are numbers which is number of things when things can be arranged in triangular shape. For Example, 1, 3, 6, 10, 15... are triangular numbers. o o o o o o o o o o is shape of n=4 triangular number what I have to do is A natural…
JRK
  • 23
  • 6
-3
votes
1 answer

Solve sparse matrix to contain values in lower triangular only

I have a square matrix that is largely zeros but interspersed with values. Is there a way to 'solve' this matrix so that all the information in it is contained in its lower triangle only, with the upper triangle containing only zeros?
L Fischman
  • 61
  • 1
  • 4
-3
votes
1 answer

How can i create a triangle in css with a box-shadow on the longest side

I am currently designing an android phonegap application and i need help trying to recreate the triangles with a Box-shadow of some sort but the box shadow will only show as a square and not a triangle. When i tried searching for an answer, i could…
Wneild5
  • 1
  • 3
-5
votes
2 answers

triangular Numbers Java

the problem is there is two types of codes for same result(triangular number) 1. for (int i = 1; i <= 10; i++) { int triangular = 0; for (int j = 1; j <= i; j++) { triangular = triangular + j; …
MKDevAr
  • 35
  • 8
1 2 3
10
11