Minggu, 17 April 2016

Problem solve 538

0

E-Book 

(Problem Solving And Program Design in C) = Finding Capital Letters In A String (Halaman 538).


#include <iostream>
#include <string.h>
using namespace std;
main(){
 char coba[100];
 int a;
 cout<<"masukkan kata =";
 cin>>coba;
 cout<<"huruf kapital pada kata tersebut =";
 for(int a=0;a<strlen(coba);a++){
  if(coba[a]>='A' && coba[a]<='Z')cout<<coba[a];
 }
}




0 komentar:

Posting Komentar