Friday, January 20, 2012

SIMPLE MACHINE PROGRAM IN C++

#include <iostream>
using namespace std;
 

const int size=10000; 
int top; 
char stack [size]; 

addpush (char item); 
deletepop(); 
Elementdisplay();
 
        addpush(char item) 
        { 
 
            if(top==size)  { 
 
            cout<<endl<<"It WAS already FULL! Please delete Other element\n"; 
                            } 
            else   {
 
            top=top+1; 
 
             stack[top]=item; 
 
             
                    }
        return 0;
        } 
 
 
 
        deletepop()
        { 
 
             if(top==0)  { 
 
                 cout<<"\n\tOPPS!!!Sorry!!!It WAS  Empty!\n"; 

                        } 
 
             else   {
 
                 top=top-1; 
 
               
                    }
       
           return 0;
        }
       
 
        Elementdisplay()
        { 
 
       
            if(top==0){
            cout<<"\n\tSorry!!!It WAS  Empty!\n";
            cout<<endl<<"\tDISPLAY:\n\tELEMENTS in STACK::\n";
                        }
            else{   
            cout<<endl<<"\tDISPLAY:\n\tELEMENTS in STACK::\n";
 
            for(int i=1;i<=top;i++)    {
                cout<<"\t\t"<<stack[i]<<endl;
                                    }
            }
                return 0;

        }
 
void main() 
 

 
    char choices; char item; 
 
    int indicator; 
      cout<<"Prepared by:: \n\t\tANTOLIN C. ABELLANO\n\t\t BSCS 4\n\t\t Data Structure\n\t\tJanuary 20,2012\n\n"; 
 
    do 
 
    {
    cout<<"||--------------------------------------------------------------------------||";
    cout<<"\n   LIST OF CHOICES\n\n";
    cout<<"\tEnter A for ADD ELEMENT\n;
    cout<<"\tEnter B for DELETE ELEMENT\n"; 
    cout<<"\tEnter C for DISPLAY  ELEMENTS\n";   
    cout<<"\tEnter D for EXIT \n"; 
 
        cout <<endl<<"    Enter Your Choice::\t"; 
 
        cin>>choices; 
        choices=toupper(choices);
    cout<<"||--------------------------------------------------------------------------||";
 
        switch (choices) 
 
        { 
 
        case 'A': 
 
            cout <<endl<<"\tENTER ELEMENT TO ADD in STACK::\t"; 
 
            cin>>item; 
 
            addpush (item); 
 
            break; 
 
        case 'B': 
 
            deletepop(); 
 
            break; 
 
        case 'C': 
 
            Elementdisplay();
 
            break;
       
        case 'D':
            cout<<"\n\t";
            exit (0);
            break;
 
        default: 
 
            cout<<endl<<endl<<"\tYour input is Incorrect! \n"; 
 
            break; 
 
        } 
 
      cout<<"\n\tDo you want to continue?\n\t(press 0 to end or press other number to continue!)";
      cin>>indicator;
   
 
    } 
 
    while(indicator!=0);
    cout<<"\t";
 } 
 
   
 
 
 

Saturday, January 7, 2012

Bicol Computer Schools



Bicol Computer Schools
Southern Luzon Technological Colleges Foundation,Inc.
is committed to helping you to achieve success in your
education, so you be a success in your career.

                          
Globally Competitive School.

                                     Enroll Now!


Contact Us:
Southern Luzon Technological College
Quezon Avenue, Oro Site,
Legazpi City, Philippines
Telefax nos: (+6352) 480-8939
(+6352) 435-4770

Cavite HOUSE and LOT

Tips for buying House and Lot




Model House

Budget Estimation

Want  to buy a house and lot, think that one of the most important things to remember before venture for property investment is BUDGET. It also measure how much maximum you can widen and all of this is important then you can decide on right property within your reach. So Cavite housing provide amazingly beautiful house and lot designs at a price that is absolutely unbelievable. Once you estimate budget you will be in fairly good position to calculate approximate value of returns in due course of time, this will help you to make informed decisions. So Find Your Dream Home today, starts your Dream House now! Try to invest in Cavite house and lot Keep your dream Home come true!


For more information Contact US @:
antolin.abellano@gmail.com
phone:
09098388555