Decimal Conversion Snippets

C++ Code Snippets for Octal - Hexadecimal - Decimal conversion

General purpose converter program for conversion between any two number systems. As long as there is more than one number system in use, conversion of numbers from one system to another is important. By this program you can convert number systems with radix more than 16 also.

19 November, 2013   

General purpose converter program for conversion between any two number systems. As long as there is more than one number system in use, conversion of numbers from one system to another is important. By this program you can convert number systems with radix more than 16 also.

Example for using thousand separator (,) for decimal integer numbers

Example for using thousand separator (,) for decimal integer numbers

13 June, 2011   

This C# code snippet inputs the principal and interest amounts and calculates simple interest.

C++ source code for Fahrenheit to celsius conversion

04 February, 2013   

Visual Basic code to check if value is decimal.

Convert a coordinate (x,y) into the index for a 1D array. For example, the coordinate (3,1) would be at array index 8 if there are 5 columns. Assumption: Arrays start at 0.

24 July, 2014   

Calculate distance between two zip codes or postal codes.

01 October, 2014   

PHP example code for secure link conversion

I was trying to pass an array through SWFObject flashvars and realized it can't be done. Instead you need to use a string for your array, pass it into Flash , then convert it to an array using the actionscript "split" function.

I was trying to pass an array through SWFObject flashvars and realized it can't be done. Instead you need to use a string for your array, pass it into Flash , then convert it to an array using the actionscript "split" function.

C code example for useful macros, functions and tricks

Converts the given floating-point value to a zero-terminated string. The supplied buffer should be large enough to accommodate the converted value. The value includes a decimal point and possiblesign and exponent information, plus a terminating null character, which is appended automatically. Returns: a pointer to zero-terminated...

C++ Example code to convert a real number to the string