#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
using namespace std;
int main()
{
char kalimat[100];
int i,jumkec,jumbes;
jumkec=0;
jumbes=0;
cout<<"\t\t===---------------------------------------==="<<endl;
cout<<"\t\t|MENGHITUNG JUMLAH HURUP KECIL & HURUF BESAR|"<<endl;
cout<<"\t\t===---------------------------------------==="<<endl;
cout<<"Input kalimat ";cin.getline(kalimat,100);
system ("cls");
for(i=0;kalimat[i];i++)
if(kalimat[i]>='a'&&kalimat[i]<='z')
jumkec++;
else
if(kalimat[i]>='A' && kalimat[i]<='Z')
jumbes++;
cout<<"\t\t===---------------------------------------==="<<endl;
cout<<"\t\t|MENGHITUNG JUMLAH HURUP KECIL & HURUF BESAR|"<<endl;
cout<<"\t\t===---------------------------------------==="<<endl;
cout<<"Isi kalimat : "<<kalimat<<endl;
cout<<"jumlah huruf kecil : "<<jumkec<<endl;
cout<<"jumlah huruf besar : "<<jumbes<<endl;
getch();
}
HomeProgram Menghitung Jumlah Huruf Kecil dan Hurup Kapital
Posting Komentar