最贊回答 / TerryLau
void表示函數(shù)返回值類型為空(或理解為無返回值),函數(shù)可以無return語句。fun是自定義的函數(shù)名,要求符合命名規(guī)則就行,最好能夠見名知意。。。
2015-11-28
最新回答 / Hc丶
#include<iostream>using namespace std;int get(int *a,int m,bool isMax){?int temp=a[0];?? for(int i=1;i<m;i++)?? {??? if(isMax)?? {?? if(temp<a[i])?? {?? temp=a[i];?? }?? }? else ? { if(temp>a[i])? {??temp=a[i];?}?? }?? }}int main(){?int a[5...
2015-10-25