Taxicab numbers | Rosetta Code | #12
URL to the problem page: http://rosettacode.org/wiki/Taxicab_numbers A taxicab number (the definition that is being used here) is a positive integer that can be expressed as the sum of two positive cubes in more than one way. The first taxicab number is 1729, which is: 1 3 + 12 3 and 9 3 + 10 3 . Taxicab numbers are also known as: taxi numbers Hardy-Ramanujan numbers Compute and display the lowest 25 taxicab numbers. #include <iostream> using namespace std ; int power ( int a , int b ) { int result = 1 ; for ( int i = 0 ; i < b; i++) { result *= a; } return result; } int main () { int cnt = 0 , cnt2,...