Question
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.
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' && nnumberStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started