Menghitung Jumlah huruf dalam Kalimat

source code

#include
#include
#include

void main()
{
char kalimat[10000];
char abjad[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n',
'o','p','q','r','s','t','u','v','w','x','y','z'};
int jml;

cout<<"Masukkan Kalimat : "<
gets(kalimat);
cout<
for (int i=0;i<26;i++){
jml=0;
for (int j=0;jif (kalimat[j]==abjad[i])
jml++;
}
if (jml>0){
cout<<"abjad "<cout<}
}
getch();
}

Comments

Post a Comment

Popular Posts