#include <stdio.h>
#include <string.h>
int main(){
char A[100];
int i,k,j;
printf("Masukkan kata : ");
gets(A);
int jumlah = 0;
for(i=0; i<strlen(A); i++){
if ((A[i]=='A') || (A[i]=='a') || (A[i]=='E') || (A[i]=='e') || (A[i]=='I') || (A[i]=='i') || (A[i]=='U') || (A[i]=='u') || (A[i]=='O') || (A[i]=='o')) {
A[i] = '9';
}
k=A[i];
j=i;
while (A[j-1] >k && j>0){
A[j] = A[j-1];
j=j-1;
}
A[j]=k;
}
printf("\n");
printf ("setelah diurutkan : \n");
for (i=0; i<(strlen(A)); i++){
printf ("%c \n", A[i]);
}
printf("%s", A);
getch();
return 1;
}
#include <string.h>
int main(){
char A[100];
int i,k,j;
printf("Masukkan kata : ");
gets(A);
int jumlah = 0;
for(i=0; i<strlen(A); i++){
if ((A[i]=='A') || (A[i]=='a') || (A[i]=='E') || (A[i]=='e') || (A[i]=='I') || (A[i]=='i') || (A[i]=='U') || (A[i]=='u') || (A[i]=='O') || (A[i]=='o')) {
A[i] = '9';
}
k=A[i];
j=i;
while (A[j-1] >k && j>0){
A[j] = A[j-1];
j=j-1;
}
A[j]=k;
}
printf("\n");
printf ("setelah diurutkan : \n");
for (i=0; i<(strlen(A)); i++){
printf ("%c \n", A[i]);
}
printf("%s", A);
getch();
return 1;
}
No comments:
Post a Comment