Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the task i have been assigned is: A pangram is a sentence or verse that contains all the letters of the alphabet. Write a C++

the task i have been assigned is: "A pangram is a sentence or verse that contains all the letters of the alphabet. Write a C++ program that checks whether a given sentence is a pangram."

In my program i tried using how frequent each letter appears from whatever inuput of words the user wishes. Anytime a letter is used I tried having it "marked down" in frequncy representing that a letter has been used. If a letter is not used 0 will be stored. What I am trying to do in my program is check in all 26 "slots" ,where i stored the frequency of each letter used, and if each "slot" contain a value of 1 or greater we are dealing with a pangram sentence. If from the sentence entered does not contain all letters of the alaphabet one of the "slots" in frequency would show up as 0 and we would not have a pangram sentence. Please look over my code and please explain what is my mistake thank you.

image text in transcribed

Run Debug Stop | C Share | _ Save | () Beautify Language #include iostream 2 using namespace std; 3 int main O 5 int i 6 int frequency [C26]-0H; 7 char lettersC100]; 8 cout 'a' &&nnumber' z') 14 15 requency[nnumber- 'a']++ 16 1 17 else if (nnumber 'A' && nnumber

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

ISBN: 3319234609, 978-3319234601

More Books

Students also viewed these Databases questions

Question

What is the difference between a hoist and a crane?

Answered: 1 week ago

Question

Explain why non-relational databases are useful.

Answered: 1 week ago