Jumat, 08 Juli 2011

Program Isupper


met mencoba yccc, , , , ^_^


#include <iostream.h>
#include <ctype.h>
#include <conio.h>
void main () {
            char s[]="123 W. 24nd 3t., NY, Ny 100387";
   int count = 0;
   for (char* p=s; *p; p++)
            if (isupper(*p)) ++count;
            cout<<s<<endl;
   cout<<count;
   getch();
 }

Tidak ada komentar:

Posting Komentar