#2539: NO NEED TO USE VECTOR


1755143-9@g.puiching.edu.mo (P5A35蔡雋言)

School : Pui Ching Middle School
ID : 3019
IP address : [192.168.120.33]
Last Login :
2025-06-13 08:58:27
b267. 排序問題(2) | From: [192.168.120.33] | Post Date : 2025-06-13 09:36

Because making vector is not easy for newbie, so I'll give some program to you guys:

sort(a, a + 10); A array can also sort but not using vector than hard; reverse(a, a + 10); An array can also reverse and not using a vector to carry all the numbers.

So I will give the hole program to you guys but make sure you guys see all the words upside ok?

 

JUST PULL THE THING IN THE RIGHT FOR FASTER LOOKING AT THE PROGRAM.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

#include<bits/stdc++.h>

using namespace std;

int main(){

    int a[10];

    for (int i = 0;i <= 9;i++) cin >> a[i];

    sort(a, a + 10);

    reverse(a, a + 10);

    for (int i = 0;i <= 9;i++) cout << a[i] << " ";

    return 0;

}

 
#2583: Re:NO NEED TO USE VECTOR


1753422-4@g.puiching.edu.mo (P5A30廖善衡 :)

School : Pui Ching Middle School
ID : 2950
IP address : [192.168.120.33]
Last Login :
2025-06-05 11:34:59
b267. 排序問題(2) | From: [192.168.120.33] | Post Date : 2025-06-16 08:28

Because making vector is not easy for newbie, so I'll give some program to you guys:

sort(a, a + 10); A array can also sort but not using vector than hard; reverse(a, a + 10); An array can also reverse and not using a vector to carry all the numbers.

So I will give the hole program to you guys but make sure you guys see all the words upside ok?

 

JUST PULL THE THING IN THE RIGHT FOR FASTER LOOKING AT THE PROGRAM.

 

 

 

 ez :)

E01

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

#include<bits/stdc++.h>

using namespace std;

int main(){

    int a[10];

    for (int i = 0;i <= 9;i++) cin >> a[i];

    sort(a, a + 10);

    reverse(a, a + 10);

    for (int i = 0;i <= 9;i++) cout << a[i] << " ";

    return 0;

}



 
 
#2585: Re:NO NEED TO USE VECTOR


1752786-4@g.puiching.edu.mo (林敬晉P5A08(JalenLam_progamer)(IQ...)

School : Pui Ching Middle School
ID : 3260
IP address : [192.168.120.33]
Last Login :
2025-06-05 11:37:15
b267. 排序問題(2) | From: [192.168.120.33] | Post Date : 2025-06-16 08:29

nice

 
ZeroJudge Forum