تبلیغات
برنامه نویسی با پاسکال - سیستم بانکداری با استفاده از آرایه ها

ارائه سورس کد ها و پروژه های پاسکال تحت ویندوز!
صرفا جهت آموزش ، نه کپی برداری برای پروژه های دانشگاهی!

لطفا سورس کد های این وبلاگ را برای پرژه های دانشگاهی تون استفاده نکید ، واقعا هدف وبلاگ این نیست.
تمامی مسولیت کپی کردن و ارائه به استاد بر عهده شخص شماست نه نویسنده.

حسین

جستجو

 

سیستم بانکداری با استفاده از آرایه ها

دوشنبه 9 دی 1387   11:13 ق.ظ


نوع مطلب : سورس کدهای پاسکال ،سورس کدها و پروژه های درخواستی ،

{B A N K I N G  S Y S T E M
PROGRAMMING BY :
            HUSSEIN TAJARENEZHAD}
uses wincrt;

type
    information=array[1..50,1..2] of string[30];{First name,Account Type}
    accunt = array[1..50,1..2] of longint;{Customer Code,Supply}
    pro = array[1..50] of real;{Profit}
    lname = array[1..50] of string[30];{Last Name}
var
   info : information;
   no : accunt;
   fa : lname;
   prof : pro;
   i,j,sc,m : integer;
procedure starting;
          begin
               writeln('                * W E L C O M E  T O  B A N K I N G  S Y S T E M *');
               writeln;
               Writeln(' What You Want To Do?');
               writeln;
               writeln('* Add Customer                      : 01');
               writeln('* Find Customer By Last name        : 02');
               writeln('* Find Customer By Customer Code    : 03');
               writeln('* View All Customer                 : 04');
               writeln('* Profit                            : 05');
               writeln('* Delete Customer                   : 06');
               writeln('* For Sorting Data By Last Name     : 07');
               writeln('* For Sorting Data By Customer Code : 08');
               writeln('* Help                              : 09');
               writeln;
               writeln('Enter Service Code :');
               readln(sc);
               clrscr;
              

          end;
procedure scan;
          var
             n,i,j : integer;
             k : char;
          begin
              
               writeln('                    * A D D  C U S T O M E R  S Y S T E M *');
               writeln;

               while n > 100 do
                     begin
                          writeln('Enter Number of Customer you want to add');
                          readln(n);
                          m:=m+n;
                         

                          if n > 100 then
                             begin
                                  writeln('You can only Enter 100 customer!');
                                  m:=m-n;
                     end;
               for i:= 1 to n do
                   begin
                        for j:= 1 to 5 do
                            begin
                                 case j of
                                      1:
                                        begin
                                             writeln('Select Accunt Type For Below Chart :');
                                             writeln('***********************************');
                                             writeln('*     Account Name     *   Code   *');
                                             writeln('***********************************');
                                             writeln('* Long Period 1 Year   :    1     *');
                                             writeln('* Long Period 2 Year   :    2     *');
                                             writeln('* Long Period 3 Year   :    3     *');
                                             writeln('* Long Period 4 Year   :    4     *');
                                             writeln('* Long Period 5 Year   :    5     *');
                                             writeln('* Short Period         :    6     *');
                                             writeln('***********************************');
                                             writeln;
                                             writeln('Enter Type Code :');
                                             readln(info[i,2]);

                                             if info[i,2]='1' then
                                                info[i,2]:='Long Period 1 Year'
                                             else if info[i,2]='2' then
                                                  info[i,2]:='Long Period 2 Year'
                                             else if info[i,2]='3' then
                                                  info[i,2]:='Long Period 3 Year'
                                             else if info[i,2]='4' then
                                                  info[i,2]:='Long Period 4 Year'
                                             else if info[i,2]='5' then
                                                  info[i,2]:='Long Period 5 Year'
                                             else if info[i,2]='6' then
                                                  info[i,2]:='Short Period'
                                             else
                                                 begin
                                                      Writeln('For Your Acount Profit Not Calculate');
                                                      info[i,2]:='None';
                                                 end;

                                            
                                        end;
                                      3:
                                        begin
                                             writeln('Enter Last name of Customer :');
                                             readln(fa[i]);
                                        end;
                                      2:
                                        begin
                                             writeln('Enter First name of Customer :');
                                             readln(info[i,1]);
                                        end;
                                      4:
                                        begin
                                             writeln('Enter Customer Code :');
                                             readln(no[i,1]);
                                        end;
                                      5:
                                        begin
                                             writeln('Enter Customer ',no[i,1],' Supply :');
                                             readln(no[i,2]);
                                        end;
                                 end;
                            end;
                        writeln;
                        writeln('Entering Data Compelited');
                        writeln;
                        writeln('* ',info[i,1],' ',fa[i],' ',info[i,2],' Accunt Sucssecfuly Created');
                        writeln;
                        if i<>n then
                           writeln('Now Enter Data of Customer ',i+1);
                   end;
                   Writeln('Entering Data for ',n,' Customer Compelited');
                   writeln;
                   writeln('For Continue Press Enter');
                   readln;
                   clrscr;
                   starting;
                  
          end;{End of procedure scan}
end;

برای در یافت ادامه سورس کد به ادامه متن بروید.                                                                                              

procedure searchname;
          var
             l : string[30];
             flag,sni : integer;
            
          begin
               writeln('           * S E A R C H I N G  S Y S T E M : B Y  L A S T  N A M E *');
               writeln;
               writeln('Enter last name which you want to search');
               readln(l);
               flag:= 0;
               sni:=1;
               while (sni<100) and (flag=0) do
                     begin
                          if l=fa[sni] then
                             begin
                                  writeln('Data Found!');
                                  writeln;
                                  writeln('*******************************************************************************');
                                  writeln('*');
                                  writeln('* Full name     : ',info[sni,1],' ',fa[sni]);
                                  writeln('* Customer Code : ',no[sni,1]);
                                  writeln('* Supply        : ',no[sni,2]);
                                  writeln('* Accunt Type   : ',info[sni,2]);
                                  writeln('* Profit        : ',prof[sni]:8:2);
                                  writeln('*');
                                  writeln('*******************************************************************************');
                                  flag:= 1;
                             end;
                          inc(sni);
                     end;
               if flag=0 then
                  Writeln('Customer Not Found');
               writeln;
               writeln('For Continue Press Enter');
               readln;
               clrscr;
               starting;
          end;{End of procedure search name}

procedure searchcode;
          var
             cc : longint;
             flag1,sci : integer;
          begin
               writeln('        * S E A R C H I N G  S Y S T E M : B Y  C U S T O M E R  C O D E *');
               writeln;
               writeln('Enter Customer Code which you want to search');
               readln(cc);
               flag1:= 0;
               sci:=1;
               while (sci<100) and (flag1=0) do
                     begin
                          if (cc=no[sci,1]) then
                             begin
                                  writeln('Data Found!');
                                  writeln('*******************************************************************************');
                                  writeln('*');
                                  writeln('* Full name       : ',info[sci,1],' ',fa[sci]);
                                  writeln('* Customer Code   : ',no[sci,1]);
                                  writeln('* Supply          : ',no[sci,2]);
                                  writeln('* Accunt Type     : ',info[sci,2]);
                                  writeln('* Profit Per Year : ',prof[sci]:8:2);
                                  writeln('*');
                                  writeln('*******************************************************************************');
                                  flag1:= 1;
                             end;
                          inc(sci);
                     end;
               if flag1=0 then
                  Writeln('Customer Not Found');
               writeln;
               writeln('For Continue Press Enter');
               readln;
               clrscr;
               starting;
          end;{End of procedure search code}

              
procedure sortname;
          var
             index,k : integer;
             t : longint;
             t1 : real;
             temp,min : string;
          begin
          writeln('        * S O R T I N G  D A T A  S Y S T E M  B Y  L A S T  N A M E *');
          writeln;
          for i:= 1 to m do
                  begin
                       min:= fa[i];
                       index:=i;
                       for j:= i+1 to m do

                           if fa[j]< min then
                              begin
                                   min:= fa[j];
                                   index:=j;
                              end;
                           fa[index]:=fa[i];
                           fa[i]:=min;
                           for j:= 1 to 2 do
                               begin
                                    temp:=info[i,j];
                                    info[i,j]:=info[index,j];
                                    info[index,j]:=temp;
                               end;
                           for j:= 1 to 2 do
                               begin
                                    t:=no[i,j];
                                    no[i,j]:=no[index,j];
                                    no[index,j]:=t;
                               end;
                           t1:=prof[i];
                           prof[i]:=prof[index];
                           prof[index]:=t1;
                  end;
                  writeln('Data sorted By Last Name');
                  writeln('For view sorted data in first page enter show service code');
                   writeln;
                   writeln('For Continue Press Enter');
                   readln;
                   clrscr;
                   starting;
                  
          end;
procedure sortcode;
          var
             index,k,min : integer;
             t : longint;
             t1 : real;
             temp : string;
          begin
          writeln('     * S O R T I N G  D A T A  S Y S T E M  B Y  C U S T O M E R  C O D E *');
          writeln;
          for i:= 1 to m do
                  begin
                       min:= no[i,1];
                       index:=i;
                       for j:= i+1 to m do

                           if no[j,1]< min then
                              begin
                                   min:= no[j,1];
                                   index:=j;
                              end;
                           no[index,1]:=no[i,1];
                           no[i,1]:=min;
                           for j:= 1 to 2 do
                               begin
                                    temp:=info[i,j];
                                    info[i,j]:=info[index,j];
                                    info[index,j]:=temp;
                               end;

                           t:=no[i,2];
                           no[i,2]:=no[index,2];
                           no[index,2]:=t;

                           t1:=prof[i];
                           prof[i]:=prof[index];
                           prof[index]:=t1;
                  end;
                  writeln('Data sorted By Customer Code');
                  writeln('For view sorted data in first page enter show service code');
                   writeln;
                   writeln('For Continue Press Enter');
                   readln;
                   clrscr;
                   starting;
          end;
procedure show;

          begin
               writeln('        * V I E W  A L L  C U S T O M E R  A C C U N T  S Y S T E M *');
               writeln;
               writeln('*******************************************************************************');
               writeln('*   Full Name   *  Customer Code  *  Supply    *  Accunt Type    *Profit Pyear*');
               writeln('*******************************************************************************');
               for i:= 1 to m do
                   begin
                        write('  ',info[i,1],' ',fa[i]);
                        write(' ':5,no[i,1]);
                        write(' ':5,no[i,2]);
                        write(' ':5,info[i,2]);
                        writeln(' ':5,prof[i]:8:2);
                   end;
               writeln('*******************************************************************************');
              
                   writeln;
                   writeln('For Continue Press Enter');
                   readln;
                   clrscr;
                   starting;
          end;{End of procedure show}
procedure profit;
          begin
               writeln('            * P R O F I T  C A L C U L A T O R  S Y S T E M *');
               for i:= 1 to m+1 do
                  
                        if info[i,2]='Short Period' then
                           prof[i]:=no[i,2]*9/100
                        else if info[i,2]='Long Period 1 Year' then
                             prof[i]:=no[i,2]*15/100
                        else if info[i,2]='Long Period 2 Year' then
                             prof[i]:=no[i,2]*16/100
                        else if info[i,2]='Long Period 3 Year' then
                             prof[i]:=no[i,2]*17/100
                        else if info[i,2]='Long Period 4 Year' then
                             prof[i]:=no[i,2]*18/100
                        else if info[i,2]='Long Period 5 Year' then
                             prof[i]:=no[i,2]*19/100;
                       
                           
              
               writeln('With Belw Rate Profit Calculated!');
               writeln;
               writeln('                           Profit Percent Chart');
               writeln('                      ***********************************');
               writeln('                      *     Account Name     *   Code   *');
               writeln('                      ***********************************');
               writeln('                      * Long Period 1 Year   :   15 %   *');
               writeln('                      * Long Period 2 Year   :   16 %   *');
               writeln('                      * Long Period 3 Year   :   17 %   *');
               writeln('                      * Long Period 4 Year   :   18 %   *');
               writeln('                      * Long Period 5 Year   :   19 %   *');
               writeln('                      * Short Period         :   9 %    *');
               writeln('                      ***********************************');
               writeln;
               show;
          end;
procedure delete;
          var
             id : longint;
             flag : integer;
             ans : integer;
             javab : char;
          begin
               writeln('             * D E L E T I N G  C U S T O M E R  S Y S T E M *');
               writeln;
               writeln('Enter Customer Code of Customer which you want to remove :');
               read(id);
               flag:= 0;
               i:=1;
               while (i<100) and (flag=0) do
                     begin
                          if id=no[i,1] then
                             begin
                                  writeln('You Select Customer with below information!');
                                  writeln;
                                  writeln('*************************************************');
                                  writeln('*');
                                  writeln('* Full name       : ',info[i,1],' ',fa[i]);
                                  writeln('* Customer Code   : ',no[i,1]);
                                  writeln('* Supply          : ',no[i,2]);
                                  writeln('* Accunt Type     : ',info[i,2]);
                                  writeln('* Profit Per Year : ',prof[i]:8:2);
                                  writeln('*');
                                  writeln('*************************************************');
                                  flag:= 1;
                                  writeln;
                                  writeln;
                                  writeln('Are You sure to remove ',info[i,1],' ',fa[i],' Account?');
                                  writeln('If you are agree press 0 key');
                                  readln(ans);
                                  if ans=0 then
                                     begin
                                          for j:= i to m do
                                              begin
                                                   info[j,1] := info[j+1,1];
                                                   info[j,2] := info[j+1,2];
                                                   fa[j] :=fa[j+1];
                                                   prof[j] := prof[j+1];
                                                   no[j,1] := no[j+1,1];
                                                   no[j,2] := no[j+1,2];
                                              end;
                                          m:=m-1;
                                          writeln;
                                          writeln('Account sucssecfully removed!');
                                          writeln;
                                          writeln('For Continue Press Enter');
                                          readln;
                                          clrscr;
                                          starting;
                                     end
                                  else
                                      begin
                                           writeln;
                                           writeln('Removing Canceled!');
                                           writeln;
                                           writeln('For Continue Press Enter');
                                           readln;
                                           clrscr;
                                           starting;
                                      end;
                             end;
                          inc(i);
                     end;
               if flag=0 then
                  begin
                       Writeln('Customer Not Found');
                       clrscr;
                       delete;
                  end;
          end;

procedure help;
          begin
               writeln('                            * P R O F I T  P E R C E N T *');
               writeln;
               writeln('     Profit Percent Chart');
               writeln('***********************************');
               writeln('*     Account Name     *   Code   *');
               writeln('***********************************');
               writeln('* Long Period 1 Year   :   15 %   *');
               writeln('* Long Period 2 Year   :   16 %   *');
               writeln('* Long Period 3 Year   :   17 %   *');
               writeln('* Long Period 4 Year   :   18 %   *');
               writeln('* Long Period 5 Year   :   19 %   *');
               writeln('* Short Period         :   9 %    *');
               writeln('***********************************');
               writeln;
               writeln('For Continue Press Enter');
               readln;
               clrscr;
               starting;
          end;

procedure afterstarting;
          begin
               case sc of
                    01:
                       scan;
                    02:
                       searchname;
                    03:
                       searchcode;    
                    04:
                       show;
                    05:
                       profit;
                    06:
                       delete;
                    07:
                       sortname;
                    08:
                       sortcode;
                    09:
                       help;
               else
                   begin
                        writeln('* With Code: ',sc,' We Dont Have Service!!!');
                        starting;
                   end;
                   

               end;
          end;


begin
     starting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
     afterstarting;
end.

{B A N K I N G  S Y S T E M
PROGRAMMING BY :
            HUSSEIN TAJARENEZHAD}


نوشته شده توسط : حسین