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;j if (kalimat[j]==abjad[i])
jml++;
}
if (jml>0){
cout<<"abjad "< cout< }
}
getch();
}
#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;j
jml++;
}
if (jml>0){
cout<<"abjad "<
}
getch();
}
kok g lengkap ya???
ReplyDelete