#include <iostream>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <stdio.h>
#include <algorithm>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int x;
while(scanf("%d",x))
{
int num[x];
for(int i=0;i<x;i++)
{
scanf("%d",&num[x]);
}
sort(num,num+x);
for(int j=0;j<x;j++)
printf("%d ",num[x]);
printf("\n");
}
return 0;
}
#include
#include
#include
#include
#include
#include
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int x;
while(scanf("%d",x))
{
int num[x];
for(int i=0;i<x;i++)
{
scanf("%d",&num[x]);
}
sort(num,num+x);
for(int j=0;j<x;j++)
printf("%d ",num[x]);
printf("\n");
}
return 0;
}
單筆輸入~~
#include
#include
#include
#include
#include
#include
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int x;
while(scanf("%d",x))
{
int num[x];
for(int i=0;i<x;i++)
{
scanf("%d",&num[x]);
}
sort(num,num+x);
for(int j=0;j<x;j++)
printf("%d ",num[x]);
printf("\n");
}
return 0;
}
單筆輸入~~
順便在補一下