C# 控制台程序
using System;
class ReadDouble
{
baipublic static void Main()
{
try{
Console.Write("请输入一个
浮点数");
double a =double(Console.ReadLine());
double b=0,c=0;
}
catch(Exception e)
{Console.Write(e.Meassage);}
c=a%10;
b=(int)(a-c);
Console.writeln("整数部分:"+b);
Console.writeln("小数部分:"+c);
}
}