最新回答 / 慕粉4364288
y就是指我們定義的變量y的值, +號的作用是連接字符,這里連接了后面雙引號里面內容,是一個空格,這樣每輸出一次y的值也要輸出一個空格,這樣就把輸出的每個數字都隔開了(5 4 3 2 1)不然他們就會連在一起(54321)這樣子。不好意思,剛剛打成x了。
2018-04-11
最贊回答 / 萬言千謊
??????????? for(int x=1;x<=7;x++)//循環行數??????????? {??????????????? ??????????????? for(int dot=1;dot<=7;dot++)//循環位數(位置從左到右為1234567)??????????????? {??????????????????? if (dot == x || dot == (8 - x))//判定位置,因為0為對稱位置,即8(最大位數)減當前位置可以得到之后位置。舉個例子,第一行第一...
2018-04-10
最新回答 / 睿智狂人
namespace Test{? ? class Program? ? {? ? ? ? static void Main(string[] args)? ? ? ? {? ? ? ? ? ? for (int y = 1; y <= 7; y++)? ? ? ? ? ? {? ? ? ? ? ? ? ? for (int x = 1; x <= 7; x++)? ? ? ? ? ? ? ? {? ? ? ? ? ? ? ? ? ? if(x <= y)? ? ? ? ? ? ? ? ?...
2018-04-09
最贊回答 / 慕數據6914329
string[] name = new string []{ "吳松", "錢東宇", "伏晨", "陳陸", "周蕊", "林日鵬", "何昆", "關欣" };? ? ? ? ? ? int[] score = new int[] { 89, 90, 98, 56, 60, 91, 93, 85 };你沒有加[],for (int i = 0; i < score.Length; i++)不是<=,而是<更改后:using System;using System.Collection...
2018-04-01
最新回答 / qq_RR_15
static void Main(string[] args)??????? {??????????? int[] score={89,90,98,56,60,91,93,85};??????????? string[] name={"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關欣"};????????????int N=score[0];//假設第一個分是最高分??????????? for (int i=1; i<score.Length; i++)???????...
2018-03-30