SHARE
TWEET

algorithom 5

Umme_nishat Jun 28th, 2020 1,342 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     char a[10],k;
  5.     gets(a);
  6.  
  7.       int i,j;
  8.      for(j=1;a[j]!='\0';j++){
  9.         for(i=0;i<j;i++){
  10.             if(a[i]>a[j]){
  11.             t=a[j];
  12.             a[j]=a[i];
  13.             a[i]=k;
  14.             }
  15.         }
  16.  
  17.     }
  18.     puts(a);
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top