usingSystem;namespaceCGO{classProgram{staticvoidMain(string[] args){
Console.WriteLine("hello world");
Console.Beep();// a beep voice
Console.Write(Environment.NewLine+"hey");
Console.ReadKey();}}}
ch1
// comment/**/int x =1;double y =2.2;float z =1.2f;bool b =true;char x ='x';string name ="etcix";String why ="wtf";constdouble E =2.7;
ch2
staticvoidTest(){double a =1.22;int b = Convert.ToInt32(a);
Console.WriteLine(b);
Console.WriteLine(a.GetType());}// v2staticvoidTest(){
Console.WriteLine("what is your name?");String name = Console.ReadLine();
Console.WriteLine("hello "+ name);int age = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("your age is "+ age);}
ch3
int a = Math.Abs(-11);double s = Math.Pow(a,2);
ch4
// Random Random r =newRandom();
Console.WriteLine(r.Next(1,2));
Console.WriteLine(r.NextDouble());