using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DoubleVsDecimal
{
class Program
{
static void Main(string[] args)
{
float fnum1 = 2.6f;
float fnum2 = 4.0f;
Console.WriteLine("{0}" , fnum2/fnum1);
double istnum = 2.6d;
double secndnum = 4.0d;
Console.WriteLine("{0}" , secndnum / istnum);
decimal num1 = 2.6m;
decimal num2 = 2.9m;
Console.WriteLine("{0}" , num2 / num1 );
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DoubleVsDecimal
{
class Program
{
static void Main(string[] args)
{
float fnum1 = 2.6f;
float fnum2 = 4.0f;
Console.WriteLine("{0}" , fnum2/fnum1);
double istnum = 2.6d;
double secndnum = 4.0d;
Console.WriteLine("{0}" , secndnum / istnum);
decimal num1 = 2.6m;
decimal num2 = 2.9m;
Console.WriteLine("{0}" , num2 / num1 );
Console.ReadKey();
}
}
}
0 comments:
Post a Comment