Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int b;
  5. scanf("%d",&b);
  6. int i,j,a[b],temp;
  7. for(i=0;i<b;i++)
  8. scanf("%d",&a[i]);
  9. for(i=0;i<b;i++)
  10. {
  11. for(j=0;j<b;j++)
  12. {
  13. if(a[i]<a[j])
  14. temp=a[i];
  15. a[i]=a[j];
  16. temp=a[j];
  17. }
  18. printf("%d", a[i]);
  19. }
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement