Guest User

Untitled

a guest
Nov 19th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. int a[26],b[26],n,m=0;
  2.  
  3. void only_odd()
  4. {
  5. for(int i=0;i<n;i++)
  6. if(!(a[i]%2))
  7. b[m++]=a[i];
  8. }
  9.  
  10. void sort_array()
  11. {
  12. for(int i=0;i<m;i++)
  13. for(int j=i;j<m;j++)
  14. if(b[i]<b[j])
  15. {
  16. int aux = b[i];
  17. b[i]=b[j];
  18. b[j]=aux;
  19. }
  20. }
Add Comment
Please, Sign In to add comment