Thursday 24 January 2013

simple database using c++





    #include <iostream>
    #include <stdio>
    #include <conio>
   class bank

   {

    private:
    static int ar;
    char name[44],id[33],acount_no[44];
    int save_b,m_i;


   public:
     bank()

     {

      ar;
     }


     void input()

     {

      cout<<"\t\tenter your id number\t";gets(id);
      cout<<"\t\tenter your name\t\t";gets(name);
      cout<<"\t\tenter your acount_no\t";gets(acount_no);
      cout<<"\t\thow many money do you want to deposit in your account\t";cin>>save_b;
     }
     void save()

     {
            cout<<"\t\tYour id is\t"<<id<<endl;
            cout<<"\t\tYour name is\t"<<name<<endl;
            cout<<"\t\tYour acount_no is\t"<<acount_no<<endl;
            cout<< "\t\tYour deposit money is\t"<<save_b<<endl;
     }






       void calculates()
       {

        m_i=save_b*ar/12;
        cout<<"Monthly interest rate is\t"<<m_i<<endl;


       }

         int getcount()
         {
          return ar++;
         }



   };

        int bank::ar=100000;
     void main()
     {

     bank k1,k2;
     k1.input();
     k1.save();
     k1.calculates();
   
     getch();}

0 comments:

Post a Comment