關於C 的一道簡單題目,c 的一道簡單題目

時間 2022-09-17 08:40:58

1樓:

min,max=deal(a);

有這樣賦值的嗎?

int deal(int *p)

這個函式這麼寫吧

void deal(int *p,int& min,int& max);

把這個函式的返回語句

return min,max;

去掉。以及int min,max,i;改為int i;

在main中呼叫時為deal(p,min,max)

2樓:匿名使用者

/*enter 5 numbers : 12 43 5 89 70min = 5

max = 89

press any key to continue*/#include #include

using namespace std;

void getdata(int *p, int n);void deal(int *p,int n, int &, int &);

int main()

c++的一道簡單題目

3樓:匿名使用者

你的if語句亂套了,改成用&&連線就可以了,else只會進入上乙個if不成立的情況

你的程式改正後的

#include

using namespace std;

int main()

return 0;}

c語言一道題目,C語言一道題目

static int count 4 這個count是在for迴圈中定義的,他的作用於只限於for迴圈中,因此 for i 0,sum 0 i count i 2,count 以及倒數第二句的sum count 處的count都是全域性變數的count,而迴圈體內部的count每次迴圈都會重新定義一...

一道c語言的題目,一道C語言的題目。

你自己已經做出來了是60503了!注意,乙個整型數,在記憶體中是低位在低位址依次向高位元組排放的。就是說,從低位址向高位址看確實是0x03 05 00 06,但代表的16進製制數卻不是它而是從高位址向低位址排下來的0x60503 struct node struct node s struct no...

求教一道c語言題目,求教一道C語言題目

明晚今朝 include include int main void 求方程ax 2 bx c 0的解 else disc 0,方程有兩個虛根 書上例題做練習時留下的 火車上的仰望 這道題很多書上都是作為習題來講的。 little發卡 include include int main double ...

求解一道c語言題目,求解一道C語言題目

while n 當要處理的資料不為0,則執行迴圈 獲取去掉最後一位數字之後的整型資料,以便進入下次迴圈 n n 10 以234為例 第一次迴圈 t 134 10 4,4為偶數,直接做 n 134 10 13 第二次迴圈 t 13 10 3,3為奇數 x 0 3 1 3 i 1 10 10 調權為十位...

C語言的一道題,急求解,關於C語言的一道題目,急求解,謝謝

你的程式問題多多 需要修改的地方也很多,可能思路也很難用你程式裡的我做了乙個,你可以參考一下我的,或許你也能改動些變成你的我在程式如下 include stdio.h include int main k 0 k值要再次賦0值 long arr 100 用來儲存整數的陣列long sum 0 計算中...