Negative without '-'
Simple: return a negative number without using the '-' sign.
Thanks to Problem <https://www.mathworks.com/matlabcentral/cody/...
4 years ago
Solved
The Piggy Bank Problem
Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.]
Bonus though...
4 years ago
Solved
Last non-zero digit
Given a number n, find the last non-zero digit of the factorial of that number.
You need to take care of the large values of n....
5 years ago
Solved
Brain Teaser Solver
Write an algorithm to solve this brain teaser:
You have a square that is broken into four triangles, the area of three of tho...
Compute Khinchin's constant
Khinchin's constant K_0 = 2.684542001... (also written "Khintchine's constant") has the amazing property that it is the limiting...
5 years ago
Solved
Compute the nth Pythagorean prime
Pythagorean primes have the form p = 4n+1, where n is an integer, and they can be written as the sum of squares of two integers....