Number of words in a camelcase sequence | C # code to find the count of words in a CamelCase sequence ; Function to find the count of words in a CamelCase sequence ; Driver code
using System ; class GFG { static int countWords ( String str ) { int count = 1 ; for ( int i = 1 ; i < str . Length - 1 ; i ++ ) { if ( str [ i ] >= 65 && str [ i ] <= 90 ) count ++ ; } return count ; } public static void Main ( String [ ] args ) { String str = " geeksForGeeks " ; Console . Write ( countWords ( str ) ) ; } }