課程
/后端開發(fā)
/C#
/C#開發(fā)輕松入門
2018-07-05
源自:C#開發(fā)輕松入門 4-10
正在回答
using System;using System.Collections.Generic;using System.Text;
namespace Test{??? class Program??? {??????? static void Main(string[] args)??????? {??????? ??????????? for (int x = 1;x <= 7;x++)??????????? {??????????????? for(int y = 1;y <= 7; y++)??????????????? {??????????????????? if( x == y || 8-x == y)??????????????????? {??????????????????????? Console.Write("0");??????????????????????? continue;??????????????????? }??????????????????? Console.Write(".");??????????????? }??????????????? Console.WriteLine();??????????? }??????????? ??????? }??? }}
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? for(int a=1;a<8;a++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? for(int b=1;b<8;b++)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? if(b==a||b==(8-a))
? ? ? ? ? ? ? ? ? ? Console.Write("o");
? ? ? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? Console.Write(".");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.WriteLine();
? ? ? ? ? ? }
? ? ? ? ? ? //請完善代碼
? ? ? ? ? ??
? ? ? ? }
? ? }
}
舉報
本門課程是C#語言的入門教程,將帶你輕松入門.NET開發(fā)
1 回答跪求解求解
2 回答求解????
2 回答求解???
5 回答求解???
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2019-01-13
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
??? class Program
??? {
??????? static void Main(string[] args)
??????? {
???????
??????????? for (int x = 1;x <= 7;x++)
??????????? {
??????????????? for(int y = 1;y <= 7; y++)
??????????????? {
??????????????????? if( x == y || 8-x == y)
??????????????????? {
??????????????????????? Console.Write("0");
??????????????????????? continue;
??????????????????? }
??????????????????? Console.Write(".");
??????????????? }
??????????????? Console.WriteLine();
??????????? }
???????????
??????? }
??? }
}
2018-07-06
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? for(int a=1;a<8;a++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? for(int b=1;b<8;b++)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? if(b==a||b==(8-a))
? ? ? ? ? ? ? ? ? ? Console.Write("o");
? ? ? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? Console.Write(".");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.WriteLine();
? ? ? ? ? ? }
? ? ? ? ? ? //請完善代碼
? ? ? ? ? ??
? ? ? ? }
? ? }
}