Get paid to share your links!

Penghitung Huruf/karakter

Wednesday, March 7, 2012

#include
#include
#include

int main()
{
char kata[100];
int a,kalimat=0,voc=0,lain;
cout<<"==============================\n";
cout<<"= Program Menghitung Huruf =\n";
cout<<"==============================\n";
cout<<"\n";
cout<<"Tuliskan kalimat !\n\n";
gets(kata);

for (a=0; kata[a]!='\0';a++)
{
kalimat++;
}

for (a=0; kata[a]!='\0';a++)
{
if(kata[a]=='a'||kata[a]=='e'||kata[a]=='i'||kata[a]=='o'||kata[a]=='u')
{
voc++;
}
}

lain=kalimat-voc;

cout<<"\n";
cout<<"Total Semua Karakter yang ada : "< cout<<"Total Huruf Vokal (a,i,u,e,o) : "< cout<<"Total Huruf nonVokal dan karakter lainya : "<
getch();
}
Share this article :

0 comments:

Speak up your mind

Tell us what you're thinking... !

Followers

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Blog - All Rights Reserved
Template Created by Creating Website Inspired by Sportapolis Shape5.com
Proudly powered by Blogger