double d = double.Parse(Console.ReadLine()); // d = Math.PI;//圆周率 // d = Math.Sqrt(d);//开方 // d = Math.Ceiling(d);//只要小数...
分类:
其他好文 时间:
2014-10-19 23:09:58
阅读次数:
321
类型:一、数字1)Math.Ceiling()( 表示进位。));//只要小数点后有值,就向前进一位,取上限。string s = Console.ReadLine(); double d = double.parse(s); d = Math.Ceiling(d);d = Math.Floor(d...
double d = double.Parse(Console.ReadLine());d = Math.PI; //圆周率d = Math.Sqrt(d); //开方d = Math.Ceiling(d); //当为整数时取整,当小数点后大于0,取上限加1取整d = Math.Floor(d); ...
分类:
其他好文 时间:
2014-10-19 22:40:44
阅读次数:
320
////Console.WriteLine();////ints=int.Parse(Console.ReadLine());//doubled=double.Parse(Console.ReadLine());////d=Math.Sqrt(d);//平方根,即25时,输出为5,,,输入4,0时输...
分类:
其他好文 时间:
2014-10-19 16:49:18
阅读次数:
216
格式为: try { int i = int.Parse(Console.ReadLine());//容易发生错误的语句 Console.WriteLine("你输入的没有错误"); } catch (Exception e) { Console.WriteLine("你输入的格式有误!!!"...
分类:
其他好文 时间:
2014-10-18 18:08:56
阅读次数:
152
//类型 /* string s = Console.ReadLine(); int i = s.Length;//这是获取字符串长度,并返回int值,需要int类型接受。“属性”无需括号 s = s.Trim();//去掉字符串前后的空格。“方法”需用括号 //s=s.TrimStart();去掉...
分类:
其他好文 时间:
2014-10-17 18:13:11
阅读次数:
166
/* try { int i = int.Parse(Console.ReadLine()); Console.Write("没有错误的话会执行:"+i+",");//运行正常,执行这里 } catch (Exception e) //出现错误会跳到这里 { Console.Write("程序出现未...
分类:
其他好文 时间:
2014-10-17 18:08:43
阅读次数:
135
1 Console.Write("请输入月数:"); 2 int m =int.Parse(Console.ReadLine()); 3 int ct = 0;//成兔对数ct 4 int xt = 0...
分类:
其他好文 时间:
2014-10-17 09:22:24
阅读次数:
173
1 Console.Write("请输入一个数:"); 2 int n = int.Parse(Console.ReadLine()); 3 for (int i = 1; i <= n; i++) 4 ...
分类:
其他好文 时间:
2014-10-17 09:19:04
阅读次数:
126
# 创建项目相关目录 /opt/logs/tv-cibn-cms#ruby 用户下安装 rbenv 及 ruby 1.9.3# 安装编译相关包yum install -y gcc openssl-devel libyaml-devel readline-devel zlib-develsu - ru...
分类:
其他好文 时间:
2014-10-16 23:37:23
阅读次数:
212