Decimal calculation : Decimal « Data Type « Visual C++ .NET






Decimal calculation

 

#include "stdafx.h"
using namespace System;

void main()
{

    Decimal a = (Decimal)123456789012345000000.00000000;
    Decimal b = (Decimal)678901.23456780;
    Decimal c = -(a + b);

    Console::WriteLine( c );
}

   
  








Related examples in the same category

1.Cast to decimal
2.Decimal constructor
3.Using Decimal constructor
4.Break decimal up into 4 parts
5.Decimal literal assigned