看不懂 输入三个整数 从小到大排列 看不懂意思 #includeusing namespace std;int main

学习 时间:2026-08-24 21:53:24 阅读:2813
看不懂 输入三个整数 从小到大排列 看不懂意思 #includeusing namespace std;int main(){int tmp[4];int a=0,b=0,c=0;cin >>a >> b >> c;tmp[0]=a;tmp[1]=b;tmp[2]=c;tmp[3]=-1;for(int i=1;i=i;j--){if(tmp[j]

最佳回答

仁爱的小笼包

温婉的小馒头

2026-08-24 21:53:24

这个程序是用冒泡法排序,只不过它是由最后往前冒。#includeusing namespace std;int main(){int tmp[4];int a=0,b=0,c=0;cin >>a >> b >> c;tmp[0]=a; //tmp数组有4个元素,其中第四个tmp[3]是辅助用人的tmp[1]=b;tmp[2]=c;tmp[3]=-1;for(int i=1;i=i;j--) //排序由数组的最后往前做冒泡排序{if(tmp[j]

最新回答共有2条回答

  • 爱笑的狗
    回复
    2026-08-24 21:53:24

    这个程序是用冒泡法排序,只不过它是由最后往前冒。#includeusing namespace std;int main(){int tmp[4];int a=0,b=0,c=0;cin >>a >> b >> c;tmp[0]=a; //tmp数组有4个元素,其中第四个tmp[3]是辅助用人的tmp[1]=b;tmp[2]=c;tmp[3]=-1;for(int i=1;i=i;j--) //排序由数组的最后往前做冒泡排序{if(tmp[j]

上一篇 there is much ----(pollute)in the lake. the box is much too

下一篇 书,是我生命的一部分.怎么理解