已采納回答 / qq_陽光丶剛好_0
因為你給{0}的賦的值是sum,你打印的是Consol.WriteLine("和是{0}",sum)這里的0本來沒有任何值,是取決于你給0賦什么值,里的sum改成int_num1這里的0就會變成int_num1了
2017-09-19
最新回答 / qq_慕運維0487080
using System;using System.Collections.Generic;using System.Text;namespace Test{? ? class Program? ? {? ? ? ? static void Main(string[] args)? ? ? ? {? ? ? ? ? ? string today;//今天的午飯? ? ? ? ? ? string tomorrow;//明天的午飯? ? ? ? ? ? string temp;//中間變量? ? ? ? ?...
2017-09-15
已采納回答 / qq_涉獵鳶_03255377
for (int y = 1; y <= 7; y++) {?????for (int x = 1; x <= 7; x++) ?{ ?????????????????//這里把x <= 7換成x <= y?? ? ? ? ? ? ? ? ?Console.Write(x); ??? ? ? ? ? ? ? ? ?if(x==y) ??? ? ? ? ? ? ? ? ?break; ? ? ? ? ? ? ? ?} ?????????????????????//然后這里去掉brea...
2017-08-21
已采納回答 / 慕容5048221
表示一樓回答錯誤,x從零開始輸出的是0到12,樓主你的代碼實際上沒有錯,但這里需求是所有數字橫排輸出,所以你得把你循環體里的WriteLine改成Write即可,就沒毛病了。
2017-08-17
已采納回答 / Jordan_Nick
{0}{1}{2}分別對應三個數組,‘工’‘程’‘師’三個元素分別在{1}數組中的第二個元素,{1}數組中的第三個元素和{2}數組中的第1個元素。
2017-08-16
已采納回答 / 捧花人3880558
用 while 就會陷入死循環呀, 當x=1 時,x%2!=0 恒成立, 程序會一直執行 while里面的?sum += x; 語句,不死不休啊~
2017-08-09
已采納回答 / Ruying
string[] name = new string[8] { "景珍", "林喜洋", "成蓉", "洪南昌", "龍玉民","單江開", "田武山", "王三明" };? ? ? ? ? ? int[] score = new int[8] { 90, 65, 88, 70, 46, 81, 100, 68 };? ? ? ? ? ? int sum, avg;? ? ? ? ? ? sum = 0;? ? ? ? ? ? for (int i = 0; i < score.Length; i+...
2017-07-25
已采納回答 / qq_小神琪_03674221
這個你寫的那個交換出了點問題,應該首先將today賦給temp,這樣today就空出來了,再將tomorrow賦值到today上面,此時,我們可以看到temp就是我們之前的today了,再將temp賦給tomorrow,這樣就進行了交換。代碼:? ? ? ? ? ? temp = today;? ? ? ? ? ? today = tomorrow;? ? ? ? ? ? tomorrow = temp;其次:那個下面的{0}{1},對應的是那個后面的today,tomorrow。你可以將{0}{1}改成...
2017-07-18