最新回答 / 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
最新回答 / onemoo
在程序最后加上 getchar() 函數(shù)(在stdio.h中)吧,這個庫函數(shù)會等待你輸入一個字符,所以程序會在你按下任意字符后才退出。
2015-10-10
已采納回答 / onemoo
不行。一般來說,你代碼的入口是main函數(shù),它的參數(shù)和返回值也是有要求的,你的程序會從main開始執(zhí)行。(另外,其實你可以在編譯時指定從別的函數(shù)開始執(zhí)行,但不管怎樣,入口函數(shù)只能有一個)
2015-10-04