Wlcome to the blogging tifani

Program Menghitung Jumlah Huruf Kecil dan Hurup Kapital

Selasa, 21 Oktober 20140 komentar

#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();
 
}

Share this article :

Posting Komentar

 
Support : Cara Gampang | Creating Website | Johny Template | Mas Templatea | Pusat Promosi
Copyright © 2015. TIfanie - All Rights Reserved
Template edited by Creating Website Modify by Teknologi Informasi kinie
Proudly powered by Blogger