求c高手幫幫看看哪出錯了怎麼改

時間 2022-07-12 11:40:04

1樓:匿名使用者

就是兩個writeline錯了。

改過的部分程式如下:(從第二個for迴圈開始)for (i = 0; i < score.length; i++)的成績為", i+1, score[i]);

a = score[0];

if (score[i] > a)

}console.writeline("學生的總分為,平局分為,最高分為", s, s / score.length, a);

console.readkey();

2樓:佬的啊我沙溝曾

//最後一個迴圈之後的內容全部換為如下,得到的效果見圖for (i = 0; i < score.length; i++)console.writeline("學號為的成績為",i+1, score[i]);

a = score[0];

if (score[i] > a)

console.writeline("學生的總分為,平局分為,最高分為", s, s / score.length, a);

console.readkey();

3樓:連名字什麼的都

console.writeline("學號為的成績為",score[i]);

這裡是不是少個引數?console.writeline("學號為的成績為",i+1,score[i]);

console.writeline("學號為的成為學生的總分為,平局分為,最高分為", i++, score[i],s,s/score.length,a);這裡是不是要迴圈輸出?

話說你也說說你的要求是什麼啊要怎麼看錯在**啊?

C 求排列組合,幫忙看看到底錯在哪,怎麼改

主要有兩個問題 1.是字串操作。每個字串末尾都必須有個結束符 0,否則strcat 就將陣列越界從而搞亂記憶體。另外分配記憶體時你也要多分配一個位元組來存放結束符 0,改動的地方很多,你可以對照原來的程式看改了的地方。2.在函式combination中倒數第4行for int i c n 1,r 1...

C 怎麼不出值哪裡出錯了。我是新手,請高手指點,嘿嘿

include using namespace std int main cout 輸入數值 endl int sum 0,value while cin value sum value cout 結果 sum endl return 0 輸入1 2 3 a 結果輸出6,你條件只判斷了輸入的是個數字...

C語言連結串列的問題,高手來看看我怎麼就錯了

見下面 中的註釋 include include struct node int s 0 void main struct node creat struct node head printf 請再輸入一個數 p struct node malloc sizeof struct node scanf...