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]
3 years ago
10

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

Computers and Technology
1 answer:
slega [8]3 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
True or False?
Misha Larkins [42]

Answer:

The correct answer to the following question will be TRUE.

Explanation:

There are different types of shapes in the shapes gallery, by which we can draw some other geometrical unique shapes and known as Merging shapes.

There are five merging commands which give you different outputs:

  • Intersect
  • Combine
  • Union
  • Fragment
  • Subtract
7 0
3 years ago
Algorithms for solving perimeter of a rectangle
-BARSIC- [3]

Answer:

Explanation:

COMPUTE THE PERIMETER WITH THE HELP FORMULA P=2 * (L + B)

3 0
3 years ago
Can embedded computers automate security so you can lock and unlock doors remotely
garri49 [273]

I guess the correct answer is True

A thiеf must physically stеal yοur cοmputеr tο gain accеss tο its filеs and data. Firеwalls inspеct data transmittеd bеtwееn a cοmputеr and еxtеrnal rеcipiеnts tο prеvеnt unsοlicitеd data еxchangеs. An еmbеddеd cοmputеr can autοmatе sеcurity sο yοu can lοck and unlοck dοοrs rеmοtеly.

5 0
4 years ago
You need a(n) _____ to play an mp3 audio file on a desktop or laptop computer
Tanya [424]

You need a stand alone player to play an mp3 audio file on a desktop or laptop computer.

<h3>What is a stand alone player?</h3>

The standalone player is known to be a device that gives room for a person or is one that allows a Blender game to be able to run without one trying to load the Blender system.

Note that in the above, You need a stand alone player to play an mp3 audio file on a desktop or laptop computer.

Learn more about laptop computer from

brainly.com/question/13213990

#SPJ1

5 0
2 years ago
The most common layout of keys on the keyboard is the _____ keyboard.
Alex
The most common layout is called "QWERTY" because it is the first six letters on the keyboard.
6 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program to help you feed your friends at a party by doing some math about square pizzas. Assume the grader defines a str
    12·1 answer
  • Microsoft windows server and linux are examples? of:
    12·1 answer
  • A user would like to format an arrow that has been inserted into a chart. What is the most efficient method for completing this
    9·1 answer
  • Once the data center routes to the destination server that hosts the website, whats the next step in the internet process?
    10·1 answer
  • Three consecutive even integers heve a sum of 66. find the integers
    7·1 answer
  • Develop a Python module that will prompt the user for a target sum that is greater than 0 and less than 1 for the following Geom
    13·1 answer
  • In many programming environments today, one language translates the programmers' code into a different language before the compu
    6·1 answer
  • I need help with the last question pleasee help me guys .
    11·2 answers
  • Which step of the problem-solving process did the farmer use in order to figure out what success would look like?
    7·1 answer
  • This question involves the creation and use of a spinner to generate random numbers in a game. a gamespinner object represents a
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!