Advertisement
gihanchanaka

Untitled

May 9th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. /*Problem 8 GROUP 3*/
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5.  
  6.  
  7. int isCapital(char c){
  8.     return c<='Z' && c>='A';
  9. }
  10.  
  11. int main(){
  12.     char* s=(char*)malloc(10000);
  13.     scanf("%s",s);
  14.     int x,n=strlen(s),count=1;
  15.     for(x=0;x<n;x++)if(isCapital(s[x]))count++;
  16.     printf("%d\n",count);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement