課程
/后端開發(fā)
/C#
/C#開發(fā)輕松入門
C#零基礎(chǔ)課程的4-9編程題怎么做?
2017-09-18
源自:C#開發(fā)輕松入門 4-9
正在回答
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? for (int y = 1; y <= 7; y++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? for (int x = 1; x <= 7; x++)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? Console.Write(x);
? ? ? ? ? ? ? ? ? ? if(x==y)
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.WriteLine();//換行
? ? ? ? ? ? }
? ? ? ? }
? ? }
}
for (int y = 1; y <= 7; y++) ??????????? { ??????????????? for (int x = 1; x <= y; x++) ??????????????? { ??????????????????? Console.Write(x); ??????????????? } ??????????????? Console.WriteLine(); ??????????? }
舉報(bào)
本門課程是C#語(yǔ)言的入門教程,將帶你輕松入門.NET開發(fā)
2 回答4-10編程題怎么做呀?
2 回答編程問(wèn)題
1 回答c#4-10編程課的答案是什么?
2 回答3-6編程題
6 回答2-8的編程題求解
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-09-15
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? for (int y = 1; y <= 7; y++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? for (int x = 1; x <= 7; x++)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? Console.Write(x);
? ? ? ? ? ? ? ? ? ? if(x==y)
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? Console.WriteLine();//換行
? ? ? ? ? ? }
? ? ? ? }
? ? }
}
2017-09-18
for (int y = 1; y <= 7; y++)
??????????? {
??????????????? for (int x = 1; x <= y; x++)
??????????????? {
??????????????????? Console.Write(x);
??????????????? }
??????????????? Console.WriteLine();
??????????? }