Write a program (C#)named CountConsonants thataccepts a phrase " Given below " from the user and counts thenumber of consonants in the given phrase. For this exercise, countboth uppercase and lowercase consonants,consider y to be consonantalso.
string[] consonants = { "B", "C", "D", "F", "G", "H", "J", "K","L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "X", "Y", "Z","b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q","r", "s", "t", "v", "w", "x", "y", "z"};
NOTE: UES THE PHRASE BELOW
" This practical is a piece of cake "
Write a program (C#) named CountConsonants that accepts a phrase " Given below " from the user and counts the number of
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am