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

February 2018

S M T W T F S
    123
45678910
11121314151617
18 192021222324
25262728   

Tags

    Recent Entries

    Recent Comments

    Search My Blog

    1 user(s) viewing

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

    Categories