/*
第四课的C#文件
*/using System;
using System.Collections.Generic;
using System.Text;namespace ConsoleApplication1
//namespace是命名空间范围 这里表示 System 的范围{
class Program4 {
public static void Main(string[] args) {
double x;
double y; x = 10.0; //给x定义10.0 y = x * x * 3.1416; //给y定义10.0乘10.0乘3.1416 Console.WriteLine("y的结果是: " + y); }
}
}
这个非常容易理解,但是我就是不明白书里要我学这个用在那里的.
我说的是这个计算方法?那方面用的着上面的代码?
第四课的C#文件
*/using System;
using System.Collections.Generic;
using System.Text;namespace ConsoleApplication1
//namespace是命名空间范围 这里表示 System 的范围{
class Program4 {
public static void Main(string[] args) {
double x;
double y; x = 10.0; //给x定义10.0 y = x * x * 3.1416; //给y定义10.0乘10.0乘3.1416 Console.WriteLine("y的结果是: " + y); }
}
}
这个非常容易理解,但是我就是不明白书里要我学这个用在那里的.
我说的是这个计算方法?那方面用的着上面的代码?
不可以带有小数点的
好象是这样
嘿嘿
我学这个才2天,嘿嘿
大家不要笑哦
有小数点的是double,decimal类型
A ZA A ZA!!