Please could you show me how to use stakcs and queue to create a program that divided letters (a,b,c,d,e...x,y,z) by vowel and consonant letters.We have two stacks:in first should be vowel letters and in second consonant letters.

Thanks in advance!

hmm, that seems to be a broad prespective of information you are asking.

How far are you familiar with any programming language (C / C++ / JAVA)?

if you are not familiar then you should take a tutorial and get familiar with it first.

if you are then here is the skeleton, you can work out the operations by your self

#include<iostream.h>


class stackSkeleton
{
      private:
              int top, stack[20];
      public:
             stackSkeleton();
             void push(<any parameters you want>);
             void pop(<any parameters you want>);
             int current ()
                 {
                 return top;
                 }
};

stackSkeleton::stackSkeleton()
{
    constructor goes here
}

stackSkeleton::push (int x)
{ 
    increment the stack
}


int stackSkeleton::pop ()
{ 
    decrement the stack here
}


//Main
int main () 
{

your main operations that handle pop and push

}

hope this helps you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.