Write a program (C#) named CountConsonants that accepts a phrase " Given below " from the user and counts the number of

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a program (C#) named CountConsonants that accepts a phrase " Given below " from the user and counts the number of

Post by answerhappygod »

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 "
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply