Skip to content

A repository to identify if a number K = sqrt(x² + (x-1)²) is natural

Notifications You must be signed in to change notification settings

nicolasbqd/TriangleWaves

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

TriangleWaves

A repository to identify if a number K = sqrt(x² + (x-1)²) is natural

The idea for this project is testing when the hypotenuse of a triangle whose cathets are x and x - 1 will be a natural number.

This code first generates an array that contains all the perfect squares up to a certain limit, which the user dictates, then it generates an array of possible hypotenuse values (x² + (x-1)²) and compares the two.

[PT-BR]

A idéia básica desse projeto é testar quando a hipotenusa de um triângulo com catetos x e x -1 vai ser um numero natural.

Esse código faz isso, primeiramente gerando uma array que contém todos os quadrados perfeitos até um certo limite imposto pelo usuário, depois gerando uma array com os valores que a hipotenusa pode ser(x² + (x-1)²) e comparando as duas.

About

A repository to identify if a number K = sqrt(x² + (x-1)²) is natural

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages