Answer:
/*This program is in c++*/
# include<iostream>
#include<stdio.h>
using namespace:; std;
int main()
{
int n, a[20]; /* n can be maximum 20*/
cout<<"Enter the value of n";
cin>>n;
For (int i=0;i<=n;i++)
{
cout<<"The number must be less than"<<n;
cin>>a[i];
}
int k=a[0];
for(int j=0;j<=n;j++)
{
if(a[i]<k)
{
a[i];=k
k=a[i];
}
else
{
continue;
}
}
cout<<"The numbers in ascending order are:";
for{int m=0;i<=n;i++)
{
cout<<"a[i];
}
return 0;
}
Step-by-step explanation:
The program is self explanatory.