zoukankan      html  css  js  c++  java
  • 一道程序运行结果题

     class Car
        
    {
            
    private int iYear = 0;
            
    private string sName = "";
            
    public Car()
            


            }

            
    public Car(int year, string name)
            
    {
                Car oTemp 
    = new Car();
                Car oStructure 
    = new Car(oTemp);
                
    this.iYear = year;
                
    this.sName = name;
                Console.WriteLine(
    "Structureone");
                Console.WriteLine(
    this.iYear );
                Console.WriteLine(
    this.sName );
            }

            
    public Car(Car ocar)
            
    {
                
    this.iYear = ocar.iYear;
                
    this.sName = ocar.sName;
                Console.WriteLine(
    "Structuretwo");
                Console.WriteLine(
    this.iYear );
                Console.WriteLine(
    this.sName );
            }

       class Program
        
    {
            
    static void Main(string[] args)
            
    {
                Car oCarOne 
    = new Car(1983"Eagle");
                Car oCarTwo 
    = new Car(oCarOne);
                Console.Read() ;
            }

        }

  • 相关阅读:
    【KMP】Period
    【KMP】Cyclic Nacklace
    【KMP】Oulipo
    【KMP】Number Sequence
    二分
    Stock 贪心经典 Zoj2921
    D. Block Tower
    烦人的dp
    搜索
    hdu 一个人的旅行
  • 原文地址:https://www.cnblogs.com/zencorn/p/1102273.html
Copyright © 2011-2022 走看看