问答详情
源自:4-10 编程练习

4-10怎么写

4-10怎么写

提问者:慕粉1828417622 2016-10-18 08:58

个回答

  • qq_夜星辰_0
    2016-10-18 10:10:24

    using System;
    using System.Collections.Generic;
    using System.Text;

    namespace Test
    {
        class Program
        {
            static void Main(string[] args)
            {
                //请完善代码
                
                for(int i = 1; i<=7 ; i++){
                   for(int j=1;j<=7;j++){
                       if(i==j||i+j==8){
                           Console.Write("O");
                       }else{
                           Console.Write(".");
                       }
                   }
                   Console.WriteLine();
                }
                
            }
        }
    }