C Saved Program: majestic-dog

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


#include<stdio.h>
int main()
{
    int a[100],i,j,n,map;
    printf("enter the number");
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        printf("%d",i+1);
        scanf("%d",&a[i]);
        for(j<0;j<n-1;j++)
     for(i=0;i<n-j-1;i++)
     {
         if(a[i]>a[j])
         {
             map=a[i];
             a[i]=a[i+1];
             a[i+1]=map;
         }
         else
         
         {
             printf("the ascending number");
             for(i=0;i<n;i++)
         printf("%d",a[i]);
         return 0;
             
         }
     }
}
}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs