#include
#include
using namespace std;
int cmp ( const void *a , const void *b )
{
return *(int *)a - *(int *)b;
}
int main()
{
int a[10];
for(int i=0;i<10;i++){
cin>>a[i];
}
qsort(a,10,sizeof(a[0]),cmp);
cout< return 0;
}
完全的C++,希望能给采纳
#include
int main()
{
const int an = 10;
int a[an];
int i = 0;
for (; i
cin>>a[i];
}
int min = a[0];
int max = a[0];
for (i=1; i
if (a[i] < min)
{
min = a[i];
}
if (a[i] > max)
{
max = a[i];
}
}
cout<
return 0;
}
#include
#include
using namespace std;
int main(void)
{
int arr[11];
for(int i = 0; i < 10; i++)
cin>>arr[i];
sort(arr, arr + 10);
int sum = arr[0] + arr[9];
cout<return 0;
}
#include
using namespace std;
int main(){
int a[10]='0';
int i ;
for(i=0;i<10;i++){
cin>>a[i];
}
for(i=0;i<9;i++){
if(a[i] else{ j=a[i+1]; }
}
for(i=0;i<9;i++){
if(a[i]>a[i+1]){j=a[i];}
else{ j=a[i+1]; }
cout<<"答案是:"<
}