Program for count the space from input string

By

Count the space from given string in C#
I am here to write a program in which user input the string & result will be the number of space available in inserted input.
C# code is given below you have to just copy and paste C# code in visual studio console and execute the code.




Code Sample [C# Code]
Output
 Enter the Words from which you want to count space
 Input -: Hungry Belly has no ears
 Output -: 4

3 comments:

  1. what does -1 do here?

    ReplyDelete
    Replies
    1. I did not get you .Will you please explain?

      Delete