#include "stdio.h"
#include "conio.h"
void main ()
{
int n[100],i,j,k,no;
clrscr ();
printf("Welcome to Ascending order \n\n");
printf("Enter the number of no.s do u want to give ? : ");
scanf("%d",&no);
for (i=0;i
{
printf ("\nEnter a number: ");
scanf ("%d",&n[i]);
}
for (i=0;i
{
for (j=i+1;j
{
if (n[i]>n[j])
{
k=n[j];
n[j]=n[i];
n[i]=k;
}
}
}
for (i=0;i
{
printf ("%d\n",n[i]);
}
getch ();
}
0 comments:
Post a Comment