Skip to content

Conversation

@shamilthomas8
Copy link

#include<stdio.h>
void main(){
int n,a[50],i,j,temp;
printf("enter limit:");
scanf("%d",&n);
printf("enter elements:\n");
for(i=0;i<n;i++){
scanf("%d",&a[i]);
}
for(i=0;i<n;i++){
for(j=0;j<n-i-1;j++){
if(a[j]>a[j+1]){
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}

   for(i=0;i<n;i++)
    printf("%d\n",a[i]);

}

Christian Bender and others added 30 commits March 20, 2018 16:39
Added some header files and changed the min() function
Sudoju Solver using Recursion
Sudoku Solver
Ways to dispense currency by ATM machine involving recursion.
Uses third-party library
Replaced ambigous return codes with macros.
sungbin and others added 23 commits November 8, 2018 16:22
Consistent naming of sorting algorithms in README file
…o computer_oriented_statistical_methods/Simpson's_1-3rd_rule.c
Update Simpson's_1-3rd_rule.c
This algorithm is a duplicate. We already have a linear search in this repo
changed README and corrected comments -- Prime Factoriziation
@danghai danghai closed this Oct 3, 2019
@kvedala kvedala deleted the changed_main_C branch July 5, 2020 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.