Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string>
- using namespace std;
- int main()
- {
- string str;
- cout<<"Enter string\n";
- cin>>str;
- int count=1;
- if(str[0]>='a'&&str[0]<='z')
- {
- for(int i=0;i<str.size();i++)
- {
- if(str[i]>='A'&&str[i]<='Z')
- {
- count++;
- }
- }
- cout<<count;
- }
- else cout<<"NO CAMEL CASE\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment