文章
4
粉丝
326
获赞
2
访问
41.3k
#include<iostream>
#include<algorithm>
//#include<string>
//#include<cstring>
//#include<cctype>
//#include<cstdio>
//#include<cmath>
using namespace std;
int arr[5]={0};
struct Node{
int Element;
struct Node* next;
};
int main(){
for(int i=0;i<5;++i){
cin>>arr[i];
}
sort(arr,arr+5);
Node* p=new Node;
p->next=NULL;
Node* r=p;
for(int i=0;i<5;++i){
Node* q=new Node;
q->Element=arr[i];
q->next=NULL;
r->next=q;
r=r->next;
}
int i=0;
while(p->next!=NULL){
if(i==0){
++i;
...
登录后发布评论
暂无评论,来抢沙发