Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int how;
- scanf("%d",&how);
- int arr[10];
- for(int i=0;i<how;i++)
- {
- scanf("%d,",&arr[i]);
- }
- for(int i=0;i<how;i++)
- for(int j=0;j<how;j++)
- if(arr[i]<arr[j])
- {
- int temp;
- temp=arr[i];arr[i]=arr[j];arr[j]=temp;
- }
- for(int i=0;i<how;i++)printf("%d ",arr[i]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement