第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

錯(cuò)誤在哪里呢?

? ? ? ? ? ? for (int x=1;x<=7;x++)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? for (int y=1;y<=7;y++)

? ? ? ? ? ? ? ? { ? ? ? ? ? ? ? ?

? ? ? ? ? ? ? ? ? ? if (x==y||x+y==8)

? ? ? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? ? ? Console.Write("O");

? ? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? ? ? else

? ? ? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? ? ? Console.Write(".");

? ? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? Console.WriteLine();

? ? ? ? ? ? ??

? ? ? ? ? ? }


正在回答

4 回答

是不是分號(hào)是中文狀態(tài)下的,改成英文狀態(tài)下的試試續(xù)網(wǎng):P

0 回復(fù) 有任何疑惑可以回復(fù)我~

? ? ? 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)//對(duì)角線打印O
? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? Console.Write("O");
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? Console.Write(".");//其他位置打印.
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.WriteLine();//換行
? ? ? ? ? ? }

0 回復(fù) 有任何疑惑可以回復(fù)我~
for(int?x=0;?x<7;?x++)
{
??for(int?y=0;?y<7;?y++)
??{
????if(x==y?||?(x+y)==6)
????{
??????Console.Write('o');
????}
????else
????{
??????Console.Write('.');
????}
??}
}


0 回復(fù) 有任何疑惑可以回復(fù)我~

if(x==y || x+y==8)里面括號(hào)用成中文了

貼上正確的代碼:

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||x+y==8)
??????????????????? {
??????????????????????? Console.Write("O");
??????????????????? }
??????????????????? else
??????????????????? {
??????????????????????? Console.Write(".");
??????????????????? }
??????????????? }
??????????????? Console.WriteLine();
??????????? }
??????? }
??? }
}

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
C#開(kāi)發(fā)輕松入門(mén)
  • 參與學(xué)習(xí)       255644    人
  • 解答問(wèn)題       1519    個(gè)

本門(mén)課程是C#語(yǔ)言的入門(mén)教程,將帶你輕松入門(mén).NET開(kāi)發(fā)

進(jìn)入課程

錯(cuò)誤在哪里呢?

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)