Floating-point Fundamental Types : float « Data Type « Visual C++ .NET






Floating-point Fundamental Types

 
#include "stdafx.h"
using namespace System;


void main()
{
    float w = 123.456f;   // standard decimal notation
    float x = 7890e3f;    // exponent notation
    double y = 99999999999999999999.99999999999999; // too big will truncate
    double z = 999999999999999e-300; // exponent will be reset

    Console::WriteLine( w ); 
    Console::WriteLine( x ); 
    Console::WriteLine( y ); 
    Console::WriteLine( z ); 
} 

   
  








Related examples in the same category