-
请给出下面的程序的输出结果。#include <iostream.h>templatevoid sort(T*a,int n){Tnum;for(int i=0;i<N-1;i++){for(int j=i;j<N-1;j++)if(a[j]>a[j+1]){num=a[j];a[j]=a[j+1];a[j+1]=num;}}for(i=0;i<N;I++)cout<<A[I];cout<<endl;}void main( ){int iver[5]={12,45,9,23,37}; double dver[5]={22.3,56.7,43.5,13.8,8.6};sort(iver,5); sort(dver,.5);}
-
查看答案
正确率:100%
-
2021-03-07 08:22:00
-
-
-
-
-
-
-
-
-