Subscribe to Sami Dena's Blog        RSS Feed
-----

My new code; Vowel Counter

Icon 2 Comments
Here it is:

https://gist.github....c53fcb066cd474b

2 Comments On This Entry

Page 1 of 1

Michael26 Icon

27 June 2016 - 08:38 AM
You could comment on your code.
0

Michael26 Icon

27 June 2016 - 08:44 AM
You could use LINQ
 string sentence = Console.ReadLine().ToLower(); //Use ToLower to return copy of the string converted to lower case 

    int total = sentence.Count(c => vowels.Contains(c)); //vowels type contain your list of vowels
    Console.WriteLine("Your total number of vowels is: {0}", total);
0
Page 1 of 1

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

December 2017

S M T W T F S
     12
3456789
10 11 1213141516
17181920212223
24252627282930
31      

Tags

    Recent Entries

    Recent Comments

    Search My Blog

    0 user(s) viewing

    0 Guests
    0 member(s)
    0 anonymous member(s)

    Categories