課程
/后端開發(fā)
/C#
/C#開發(fā)輕松入門
求代碼
2017-07-18
源自: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++)//循環(huán)7行? ? ? ? ? ? {? ? ? ? ? ? ? ? for (int y = 1; y <= 7; y++)//循環(huán)7列? ? ? ? ? ? ? ? {? ? ? ? ? ? ? ? ? ? if (x == y || x + y == 8)//對角線打印O? ? ? ? ? ? ? ? ? ? ? ? Console.Write("O");? ? ? ? ? ? ? ? ? ? else? ? ? ? ? ? ? ? ? ? ? ? Console.Write(".");//其他位置打印.? ? ? ? ? ? ? ? }? ? ? ? ? ? ? ? Console.WriteLine();//換行? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.WriteLine();
? ? ? ? }
? ? }
}
慕碼人9385367 提問者
舉報(bào)
本門課程是C#語言的入門教程,將帶你輕松入門.NET開發(fā)
1 回答4-10問題答案
2 回答4-10編程題怎么做呀?
2 回答c#6-8的答案
2 回答關(guān)于提交課程任務(wù)答案的問題
2 回答4-10
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-07-18
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++)//循環(huán)7行
? ? ? ? ? ? {
? ? ? ? ? ? ? ? for (int y = 1; y <= 7; y++)//循環(huán)7列
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? if (x == y || x + y == 8)//對角線打印O
? ? ? ? ? ? ? ? ? ? ? ? Console.Write("O");
? ? ? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? ? ? Console.Write(".");//其他位置打印.
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.WriteLine();//換行
? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.WriteLine();
? ? ? ? }
? ? ? ? }
? ? }
}