用C(SHARP)编写正方形和零星(中间是空的) 谢谢了

来源:百度知道 编辑:UC知道 时间:2024/06/01 13:47:05
**** 和 *
* * * *
* * * *
**** * *
*
都是用for语句搭配if语句编写
用for语句编写(1+2+3) 要求显示出来就是带+号的
谢谢各位大大了 急用 老师留的题目 不会写

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

namespace test2
{
class Program
{
static void Main(string[] args)
{
for (int i = 0; i < 10; i++)
{
for (int j = 0; j < 10; j++)
{
Console.Write(" *");
}
Console.Write("\n");
}
Console.WriteLine("正方形输出完成,按任意键退出……");
Console.Read();
}
}
}

你画的是什么东西!!?
我想试试 你在你问题上画出来图