Given a positive decimal number, find the simple exponential notation (x = a·10^b) of the given number.
Input : 100.0 Output : 1E2 Explanation: The exponential notation of 100.0 is 1E2. Input :19 Output :1.9E1 Explanation: The exponential notation of 16 is 1.6E1.
The simplest way is to find the position of the first non zero digit and the position of the dot. The difference between that positions is the value of b (if the value is positive you should also decrease it by one).
Below is the implementation of the above approach:
- Count number of digits after decimal on dividing a number
- Find the larger exponential among two exponentials
- Convert Decimal To Hexa-Decimal including negative numbers
- Exponential Squaring (Fast Modulo Multiplication)
- 9's complement of a decimal number
- 10's Complement of a decimal number
- Number of decimal numbers of length k, that are strict monotone
- Check if Decimal representation of an Octal number is divisible by 7
- Number of digits before the decimal point in the division of two numbers
- Converting Decimal Number lying between 1 to 3999 to Roman Numerals
- Given a number N in decimal base, find number of its digits in any base (base b)
- Program for Decimal to Binary Conversion
- Find length of period in decimal value of 1/n
- Convert Binary fraction to Decimal
- Program for Binary To Decimal Conversion
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.