Triangle sequence
A sequence of triangles is constructed in the following way:
1) the first triangle is Pythagoras' 3-4-5 triangle
2) the s...
8年以上 前
解決済み
Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...
8年以上 前
解決済み
Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...
8年以上 前
解決済み
Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...
8年以上 前
解決済み
How to subtract?
*± ± ± ± ± ± ± ± ± ± ±*
* Imagine you need to subtract one...
8年以上 前
解決済み
Energy of a photon
Given the frequency F of a photon in giga hertz.
Find energy E of this photon in giga electron volts.
Assume h, Planck's ...
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
Beginner's Problem - Squaring
Try out this test problem first.
Given the variable x as your input, square it by two and put the result in y.
Examples:
...