1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
GrogVix [38]
2 years ago
10

Write a program which can do a String Check if its Panagram or not!

Computers and Technology
1 answer:
slega [8]2 years ago
3 0

Answer:

#include <bits/stdc++.h>

using namespace std;

bool isPangram(string &s) //boolean function to check whether the string is pangram or not...

{

 int a[26]={0};//initializing the array a with zero.

   for(int i=0;i<s.length();i++)

   {

       if(s[i]>='A' && s[i] <= 'Z') //checking for uppercase letters..

       {

           a[s[i]-'A']++;

       }

       else if(s[i]>='a' && s[i] <= 'z')//checking for lowercase letters..

       {

           a[s[i]-'a']++;

       }

   }

   for(int i=0;i<26;i++)//if any value of array a is zero then returning false.

   {

       if(a[i]==0)

       return false;

   }

   return true;

}

int main() {

   string s;

   getline(cin,s);

   bool b=isPangram(s);

   cout<<b<<endl;

return 0;

}

Input:-

abcdefghijklmnopqrstuvwxy z

Output:-

1

Explanation:

Pangram string is a string that contains all the alphabetical letters form a to z.So the above program returns 1 if the string is Pangram and 0 if the string is not pangram.

I have used a function called isPangram of type boolean.In the function I have taken an array of size 26 and initialized it with 0.Then iterating over the string and updating the count in the array a.Then checking if any value in the array a is zero if it is then the answer is false else it is true.

You might be interested in
When planning your educational and career path, it makes sense to consider where you want to work and what type of work you want
Gekata [30.6K]
Well i think it is true
6 0
2 years ago
Which of the following is an accurate definition of a computer system? A computer system consists of the operating system that t
notka56 [123]

Answer:

I believe it's  A computer system consists of the operating system that tells the computer how to execute commands.

Explanation:

3 0
3 years ago
A process at Host C receiving two incoming UDP segments from two different hosts will know that they originated from two differe
larisa86 [58]

Answer: True

Explanation:

Each connection socket is identified with a four‐

tuple: (source IP address, source port number, destination IP address,

destination port number). When host C receives a segment, it

examines the segment and the operating system will provide the process with the IP address.

7 0
3 years ago
Read 2 more answers
All dogs = 199999990158161231
devlian [24]

Answer:

C=D cause d spells dogs jk I really dont know

3 0
3 years ago
Read 2 more answers
If html is used to specify the content of the webpage, then what do you use css for?.
alekssr [168]

Answer:

css for styling.. means for making websites looks beautiful and attractive

Explanation:

html is like skeleton which defines websites structure whereas css is like cover to the skeleon.. css is responsible for fonts, colors, position of elements, responsiveness of websites.. it makes websites looks beautiful and prettier by adding background colors, hover effects, animation, etc

6 0
2 years ago
Other questions:
  • What is process equipment?
    12·1 answer
  • Whenever I go onto Google Chrome, the words are in Spanish! How can I make the words be back in English again? Please let me kno
    7·1 answer
  • Mr. Olgesandravich is proctoring students working at their own pace in an online class. He is generating a spreadsheet that show
    15·1 answer
  • What is qwerty and why is it on the keyboard?
    15·2 answers
  • All tif files start at offset 0 with what 6 hexadecimal characters?​
    11·1 answer
  • Write a program that lets a maker of chips and salsa keep track of sales for five different types of salsa: mild, medium, sweet,
    14·1 answer
  • This is 6th grade career class.
    10·1 answer
  • With _________, users will receive recommendations for items liked by similar users.
    9·1 answer
  • Here is the problem specification: An Internet service provider has three different subscription packages for its customers: Pac
    5·1 answer
  • As a member of the help desk administration team, you've been assigned to update the driver for the network adapter that is inst
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!