设day=31,m_count=7,设计输出语句。输出形式为:there are 217 days。其中,“217”由day和m_count计算得到。

解决方案 »

  1.   

    Console.Write("there are "+day*m_count+" days");
    ?
      

  2.   

    Console.Write(String.Format("there are {0} days",day*m_count)); 
      

  3.   

    Console。Write("there are "+day*m_count+" days");
    !
      

  4.   


    int day=31;
    int m_count=7;
    Console.WriteLine("there are {0} days",day*m_count);
      

  5.   

    const int iDay = 31;
    const int iM_count = 7;
    Console.Writeline("There are {0} days",iDay*iM_count);
      

  6.   

    两种方法解决:int day=31;
    int m_count=7;
    (1)
    Console.WriteLine("There are {0} days",day * m_count);(2)
    Console.WriteLine(String.format("There are {0} days", day * m_count));