1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

why we using %e ?

Discussion in 'C' started by suganthi, Jul 8, 2012.

  1. suganthi

    suganthi New Member

    Joined:
    Jul 8, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    vellore
    whe we using %e in c language?
     
  2. skr1986

    skr1986 New Member

    Joined:
    Aug 2, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    hai suganthi,
    Try this code and see the difference...

    #include <stdio.h>
    main()
    {
    float i= 0.00009;
    printf("f = %f\ne = %e\nE = %E", i, i, i);​
    }

    Regards
    SHIBIN K.REENY
     
  3. sumedh yadav

    sumedh yadav New Member

    Joined:
    Aug 18, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    hi!suganthi
    we use %e to represent the given number in exponential form that is by this format we represent .000009=9*10^(-05),where -05 is power of base 10.
    from
    sumedh yadav
     
  4. sumedh yadav

    sumedh yadav New Member

    Joined:
    Aug 18, 2012
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    printed error rectify .000009->.00009
     

Share This Page