1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

scientific notation

Discussion in 'C#' started by aleksandar12345, Apr 26, 2013.

  1. #1
    hi
    a need to write a code in c++ given from my profesor ,to input decimal number
    and the output to be number in Scientific notation with 32 bits can somebody help me pls!!
     
    aleksandar12345, Apr 26, 2013 IP
  2. wren11

    wren11 Active Member

    Messages:
    89
    Likes Received:
    10
    Best Answers:
    3
    Trophy Points:
    53
    #2
    this seems easy enough:

    #include "stdafx.h"
    #include <math.h>
     
    int _tmain(int argc, _TCHAR* argv[])
    {
        double value = 1235;
     
        double exponent = floor(log(value) / 2.30258509299404568402);
        double mantissa = value / pow(10, exponent);
     
        return 0;
    }
     
    
    PHP:
     
    wren11, Apr 27, 2013 IP