SlideShare a Scribd company logo
1 of 7
Download to read offline
Farsi e-learning series
Farsi e-learning series
                                                                        &'&   !   " # $ !%

#include <iostream.h>
#include <conio.h>
int calc(int [],int dim);
void revmatrix( int [],int dim);
void main()
       {
            int matrix[1000];
            int dim,temp;
            double leftsum,rightsum;
       cout<<"          PLEASE ENTER MATRIX DIMANTION : ";
       cin>>dim;
       cout<<"nnn";
       for( int i = 0;i<( dim*dim );i ++ )
              {
              cout<<"ENTER ELEMAN : ";
              cin>>temp;
              matrix[i] = temp;
              clrscr();
              cout<<"         PLEASE ENTER MATRIX DIMANTION : "<<dim;
              cout<<"nnn";
       }//for i

      if ( dim > 2 )
             {
                 leftsum = calc( matrix , dim );
                 cout<<"LEFTSUM of the matrix = "<< leftsum <<"nn";
                 revmatrix( matrix , dim );
                 rightsum = calc( matrix ,dim );
                 cout<<"RIGHTSUM of the matrix = "<< rightsum <<"nnnnnn" ;
                 cout<<"      ( DETERMINAN OF THE MATRIX = "<< leftsum - rightsum<<" )";
             }

      else
             cout<<"    ( DETERMINAN OF THE MATRIX = "<<(matrix[0] * matrix[3] - matrix[1]
* matrix[2])<<" )";

       getch();
}//end main

/////////////////calc function//////////

int calc( int matrix[ ], int dim )
       {
       int sum = 0, bul, x = 1;
       for( int l = 0; l<( dim*dim );l += ( dim+1 ) )//ghotr asli
       x *= matrix[l];
       sum = x;
       x = 1;
       for( int c = 1;c<dim;c ++ )
              {
              bul=c;
              for( int m = 0;m<dim;m ++ )
                        {
                        if( ( bul+1 )%dim != 0 )
                                      {
                                          x *= matrix[bul];
Farsi e-learning series
                                                       bul +=( dim + 1 );
                                              }

                             else
                                        {
                                                       x = x * matrix[bul];
                                                       bul += 1;
                              }

             }//for m
             sum += x;
             x = 1;
      }//for c

      return sum;
}

////////////////////revmatriv determinan

void revmatrix(int matrix[ ],int dim)
       {
       int end,temp,counter;
            for( int t = dim-1;t <= dim*dim;t = t + dim )


                 {
                 end=t;
                 counter = end -( dim-1 );
                 while( end > counter )
                           {
                           temp = matrix[end];
                           matrix[end] = matrix[counter];
                           matrix[counter] = temp;
                           ++ counter;
                           -- end;
                           }

                 }
      }


      /   0 ,-   -123 *      % * % $4   ) "   %* * 5    67 * ,89 :        ; "    , 0 " % ) * + ,-     , .
                                                                     =< ,. % % % * ,89 : %* * 5 ,- , 0 %    )



                     #include <iostream.h>
                     int main()
                        {
                        int i,j;

                       double a[512],b;
                       cout<<”How many content do you want to enter ?:”;
                       cin >>i;
                       cout<<”Enter “<<i<<” contents :”;
                        for(j=0;j<i;j++)
                        cin>> a[j];
                       cout<<”Enter a keyword to search in your array : “;
                       cin >> b;
                                                          (
Farsi e-learning series
         for(j=0;j<i;j++)
         {
           if (a[j]==b)
           {
            break;
           }
         }
          if (j>=i)
          cout << "not found" << endl;
          else
          cout <<”Hurray !! your searched content is in this row :
    “<< j << endl;

      return 0;
      }




                                 >
Farsi e-learning series
                                                                                                                                                         ,8
J% 9 3 7 # !3        8- -     ,8         % % I%     3 C ;!              8- - D E ,- @7               , 05        3F . ,GH = @A$.         %% 5        B . ,8
                                                                                                    I% -         % ,4. 8- - , 8-          -D E     III * D F
                                                   I    3 QRSS O P )                               ,-            3 MN       8- -          ,8        K8. @ LF
                                     %       3    % % X . 5 D E Y$ . 3 ,8                         ,-    8-       -B .5 , 0"              % % TUVVW D F L

                                                    T     U     V       V    W        MN


                                         I   -" -    ,        8- -          ,8        " # P #* F                . !3      [A 5       $A % MN     8- - Z * %

I @9 : 8- - ,   8- - D E # ! 3 Y         @9 :     - D E % F $8 "    )   .  #0 # ! 3 Y                                    8- -   ,8 "     ) /89 :
                                                               b% - % `87 * a* 5 # ! 3                                    ,8   $8 C ;! # 5 % ^)9 ,8 _ ]




                Char ali[26]=”WWW.MRH.IR”;

                Char aida[26]={ ‘m’ , ‘a’               , ‘j’ , ‘i’ , ‘d’ }

                                                              I $ %         f. Y ,)Hc "           Y * de&             Y       @_ c*% /    $8A. ! 3 Z * % ,-

                                                                                                                            I Y$ - 3  c    " B*
                                                                                            -12       ,8             + * ,89 : ,8    " ,- $A           , .

                #include <iostream.h>
                int main()
                   {
                   char a[64];
                   int i,c;
                   cout<<"Enter a strings:"<<endl;
                   cin>>a;
                      for(int i=0; a[i]!='0'; i++);
                   cout<<"Size of string : " <<i<<endl;
                   return 0;
                   }


                I%   3      5D E J   -12             .0   + * ,89 :              ,8        3;     %    f.        g     - /$      ,- Y$A      3; ! Y$   h   :


                #include <iostream.h>
                void size(char a[],char b[])
                {
                  int i;
                    for(i=0; a[i]!='0'; i++);
                  cout<<"Size of string : " <<i<<endl;
                }
                int main()
                {
                 char a[64];
                 int i,c;
                 cout<<"Enter a strings:"<<endl;
                 cin>>a;
                 size(a);
                return 0;
                }



                                                          - 36- 3_* %                 3 *% * ,89 :         ,8              ) *% ,- $A           , .    (

                                                                    ?
Farsi e-learning series
                #include <iostream.h>
                int main()
                   {
                   char a[64],b[64];
                   cout<<"Enter 2 strings:"<<endl;
                   cin>>a;
                   cin>>b;
                   int i=0;
                    do{
                      a[i]=b[i];
                      }while(b[i++]!='0');
                   a[i]='0';

                     return 0;
                     }



                                                                I $ % f.     E9 /      0D                        ! 8j$ 3     0 * 8K / !
                                         8A d I    ,. h 8- % 3   Z !    %J .   0 a5     /                       E9 0 % ,- 3     / ! -        )!
                                         I .   3 C ;! lmne&oIT   ,. h 8- % 8A       ,8                         -, k     ,- J   ,. h 8- Z ! /
       IY 5 % P 3 #0 , *   , ,- J % % $A p 9 3A . , .      # 5 4% J# 5/ %        ,8                            $8 ,- J   6A +         ,8G. /

k         9 7                                                        q$r !                                                          Z !
    smne&oIT                                              I     $    ,   ,8      "    +                                          smnVU&bt]
    smne&oIT                                             I - 3 36- 4 % %    ,8                                                 smnduvbtwx]
    smne&oIT                              I       - 3 36- 8- - & % ;! , - c  4% %                ,8                           smn&duvbtwxw&]
    smne&oIT                                     I -3    GF                   ,8     )                                           smnnUybt]
    smne&oIT                                I -3    E8 Y ,               K.0 * ,89 : ,8        *%                               smndtmbtwx]
    smne&oIT               I      ,8   % 8- - & - c z c   ,8              ,G { I - 3           E8 Y ,     ,8        *%        smn&dtmbtwxw&]
    smne&oIT           3         J%    8: } 3 *% : J . % : 3   %              8: } 3_* : *     - 3 ,j )        ,8        *%    smnd|ubtwx]
                                                  I .% : 3   N .%                  : * .% :
    smne&oIT                   I .% : 3           g   .   ,f$8. *   -3   ,A ) Y           ,8    *% 5   * 8- - Q               smn&d|ubtwxw&]




                                                                     i
Farsi e-learning series

                                                                                                                                D   !
                              I - 36- 3_* % 3 *% * ,89 : ,8           *% ,- $A       3; ! ,G 3 ; I $ G Z ! ,        !   (
         I .% :      .%      : * . % : N J % 8: } 3 *% : I . % :            J % 8: } 3_* : * % $4     ,8    *% ,- $A     3; !
I   %   3_* %    *%     ,8  @ K. % * % - ,A )        K.0 g / ! . J 1 2           -      + J ,89 : ,8     *% ,- $A        , .    (
                              b          ,89 : %* * 5 & ] I % f.          ,8    * 8- - & *           / ! ,- $A           , .    >
                                           I - E8 4           ,    K.0 * ,89 : ,8     *% Z ! " 5 % `87 ,- $A             , .    ?
b        ,89 : %* * 5 & ] I  %    ,f$8. %    K.0 5 ,8     & * % - E8 Y ,          ,8    *% 3; ! 5 % `87 ,- $A            , .    i
                                                          I -   GF         ,8      ) " 3; ! 5 % `87 ,- $A                , .    ~




                                                      "# $ % &           !
                                         ., /,&         !        '( )        *+ , -           ,




                                                  www.mrh.ir
                                               www.majidonline.com




                                                      (•? 1                   0
                                     2 3              ,& , 45          6 789 ':) ;                     <


                                                                  ~

More Related Content

What's hot

Php in the graph (Gremlin 3)
Php in the graph (Gremlin 3)Php in the graph (Gremlin 3)
Php in the graph (Gremlin 3)Damien Seguy
 
Google Go For Ruby Hackers
Google Go For Ruby HackersGoogle Go For Ruby Hackers
Google Go For Ruby HackersEleanor McHugh
 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with PythonHan Lee
 
Swift에서 꼬리재귀 사용기 (Tail Recursion)
Swift에서 꼬리재귀 사용기 (Tail Recursion)Swift에서 꼬리재귀 사용기 (Tail Recursion)
Swift에서 꼬리재귀 사용기 (Tail Recursion)진성 오
 
Core c sharp and .net quick reference
Core c sharp and .net quick referenceCore c sharp and .net quick reference
Core c sharp and .net quick referenceArduino Aficionado
 
Implementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxImplementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxEleanor McHugh
 
Swift 함수 커링 사용하기
Swift 함수 커링 사용하기Swift 함수 커링 사용하기
Swift 함수 커링 사용하기진성 오
 
Introduction to ad-3.4, an automatic differentiation library in Haskell
Introduction to ad-3.4, an automatic differentiation library in HaskellIntroduction to ad-3.4, an automatic differentiation library in Haskell
Introduction to ad-3.4, an automatic differentiation library in Haskellnebuta
 
Google collections api an introduction
Google collections api   an introductionGoogle collections api   an introduction
Google collections api an introductiongosain20
 
Hacking Parse.y with ujihisa
Hacking Parse.y with ujihisaHacking Parse.y with ujihisa
Hacking Parse.y with ujihisaujihisa
 
Python basic
Python basic Python basic
Python basic sewoo lee
 
Generics and Inference
Generics and InferenceGenerics and Inference
Generics and InferenceRichard Fox
 
The Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveThe Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveEleanor McHugh
 
Groovy vs Boilerplate and Ceremony Code
Groovy vs Boilerplate and Ceremony CodeGroovy vs Boilerplate and Ceremony Code
Groovy vs Boilerplate and Ceremony Codestasimus
 
Functional Pe(a)rls version 2
Functional Pe(a)rls version 2Functional Pe(a)rls version 2
Functional Pe(a)rls version 2osfameron
 
Programming with GUTs
Programming with GUTsProgramming with GUTs
Programming with GUTsKevlin Henney
 
20191116 custom operators in swift
20191116 custom operators in swift20191116 custom operators in swift
20191116 custom operators in swiftChiwon Song
 
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFGo vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFTimur Safin
 

What's hot (20)

Javascript
JavascriptJavascript
Javascript
 
Php in the graph (Gremlin 3)
Php in the graph (Gremlin 3)Php in the graph (Gremlin 3)
Php in the graph (Gremlin 3)
 
Google Go For Ruby Hackers
Google Go For Ruby HackersGoogle Go For Ruby Hackers
Google Go For Ruby Hackers
 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with Python
 
Swift에서 꼬리재귀 사용기 (Tail Recursion)
Swift에서 꼬리재귀 사용기 (Tail Recursion)Swift에서 꼬리재귀 사용기 (Tail Recursion)
Swift에서 꼬리재귀 사용기 (Tail Recursion)
 
Core c sharp and .net quick reference
Core c sharp and .net quick referenceCore c sharp and .net quick reference
Core c sharp and .net quick reference
 
Implementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxImplementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 redux
 
Swift 함수 커링 사용하기
Swift 함수 커링 사용하기Swift 함수 커링 사용하기
Swift 함수 커링 사용하기
 
Introduction to ad-3.4, an automatic differentiation library in Haskell
Introduction to ad-3.4, an automatic differentiation library in HaskellIntroduction to ad-3.4, an automatic differentiation library in Haskell
Introduction to ad-3.4, an automatic differentiation library in Haskell
 
Introduction to Groovy
Introduction to GroovyIntroduction to Groovy
Introduction to Groovy
 
Google collections api an introduction
Google collections api   an introductionGoogle collections api   an introduction
Google collections api an introduction
 
Hacking Parse.y with ujihisa
Hacking Parse.y with ujihisaHacking Parse.y with ujihisa
Hacking Parse.y with ujihisa
 
Python basic
Python basic Python basic
Python basic
 
Generics and Inference
Generics and InferenceGenerics and Inference
Generics and Inference
 
The Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveThe Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's Perspective
 
Groovy vs Boilerplate and Ceremony Code
Groovy vs Boilerplate and Ceremony CodeGroovy vs Boilerplate and Ceremony Code
Groovy vs Boilerplate and Ceremony Code
 
Functional Pe(a)rls version 2
Functional Pe(a)rls version 2Functional Pe(a)rls version 2
Functional Pe(a)rls version 2
 
Programming with GUTs
Programming with GUTsProgramming with GUTs
Programming with GUTs
 
20191116 custom operators in swift
20191116 custom operators in swift20191116 custom operators in swift
20191116 custom operators in swift
 
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFGo vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoF
 

Similar to Part 7

Map Reduce 〜入門編:仕組みの理解とアルゴリズムデザイン〜
Map Reduce 〜入門編:仕組みの理解とアルゴリズムデザイン〜Map Reduce 〜入門編:仕組みの理解とアルゴリズムデザイン〜
Map Reduce 〜入門編:仕組みの理解とアルゴリズムデザイン〜Takahiro Inoue
 
Low Carbon Housing for Non-experts
Low Carbon Housing for Non-expertsLow Carbon Housing for Non-experts
Low Carbon Housing for Non-expertsurbed
 
บทที่ 3 พื้นฐานภาษา Java
บทที่ 3 พื้นฐานภาษา Javaบทที่ 3 พื้นฐานภาษา Java
บทที่ 3 พื้นฐานภาษา JavaItslvle Parin
 
An Introduction to Part of C++ STL
An Introduction to Part of C++ STLAn Introduction to Part of C++ STL
An Introduction to Part of C++ STL乐群 陈
 
Bayane moujazine umt cdt- untm
Bayane moujazine umt  cdt- untmBayane moujazine umt  cdt- untm
Bayane moujazine umt cdt- untmsharqedu
 
Swift Sequences & Collections
Swift Sequences & CollectionsSwift Sequences & Collections
Swift Sequences & CollectionsCocoaHeads France
 
Useful javascript
Useful javascriptUseful javascript
Useful javascriptLei Kang
 
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...ssuserd6b1fd
 
Introduction to cpp (c++)
Introduction to cpp (c++)Introduction to cpp (c++)
Introduction to cpp (c++)Arun Umrao
 
DiplomadoIABMex_Equipo6
DiplomadoIABMex_Equipo6DiplomadoIABMex_Equipo6
DiplomadoIABMex_Equipo6jorgemacias23
 
Наибольшая общая мера: 2500 лет
Наибольшая общая мера: 2500 летНаибольшая общая мера: 2500 лет
Наибольшая общая мера: 2500 летsixtyone
 
War and peace lesson- Answers
War and peace lesson- AnswersWar and peace lesson- Answers
War and peace lesson- Answersbkind2animals
 
Recursion to iteration automation.
Recursion to iteration automation.Recursion to iteration automation.
Recursion to iteration automation.Russell Childs
 
F# Presentation
F# PresentationF# Presentation
F# Presentationmrkurt
 
booksoncprogramminglanguage-anintroductiontobeginnersbyarunumrao4-21101016591...
booksoncprogramminglanguage-anintroductiontobeginnersbyarunumrao4-21101016591...booksoncprogramminglanguage-anintroductiontobeginnersbyarunumrao4-21101016591...
booksoncprogramminglanguage-anintroductiontobeginnersbyarunumrao4-21101016591...GkhanGirgin3
 
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...ssuserd6b1fd
 

Similar to Part 7 (20)

Map Reduce 〜入門編:仕組みの理解とアルゴリズムデザイン〜
Map Reduce 〜入門編:仕組みの理解とアルゴリズムデザイン〜Map Reduce 〜入門編:仕組みの理解とアルゴリズムデザイン〜
Map Reduce 〜入門編:仕組みの理解とアルゴリズムデザイン〜
 
Low Carbon Housing for Non-experts
Low Carbon Housing for Non-expertsLow Carbon Housing for Non-experts
Low Carbon Housing for Non-experts
 
บทที่ 3 พื้นฐานภาษา Java
บทที่ 3 พื้นฐานภาษา Javaบทที่ 3 พื้นฐานภาษา Java
บทที่ 3 พื้นฐานภาษา Java
 
An Introduction to Part of C++ STL
An Introduction to Part of C++ STLAn Introduction to Part of C++ STL
An Introduction to Part of C++ STL
 
74 kg greco
74 kg greco74 kg greco
74 kg greco
 
Bayane moujazine umt cdt- untm
Bayane moujazine umt  cdt- untmBayane moujazine umt  cdt- untm
Bayane moujazine umt cdt- untm
 
2 d matrices
2 d matrices2 d matrices
2 d matrices
 
Swift Sequences & Collections
Swift Sequences & CollectionsSwift Sequences & Collections
Swift Sequences & Collections
 
Useful javascript
Useful javascriptUseful javascript
Useful javascript
 
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...
 
Introduction to cpp (c++)
Introduction to cpp (c++)Introduction to cpp (c++)
Introduction to cpp (c++)
 
DiplomadoIABMex_Equipo6
DiplomadoIABMex_Equipo6DiplomadoIABMex_Equipo6
DiplomadoIABMex_Equipo6
 
Наибольшая общая мера: 2500 лет
Наибольшая общая мера: 2500 летНаибольшая общая мера: 2500 лет
Наибольшая общая мера: 2500 лет
 
Scala 2 + 2 > 4
Scala 2 + 2 > 4Scala 2 + 2 > 4
Scala 2 + 2 > 4
 
War and peace lesson- Answers
War and peace lesson- AnswersWar and peace lesson- Answers
War and peace lesson- Answers
 
Recursion to iteration automation.
Recursion to iteration automation.Recursion to iteration automation.
Recursion to iteration automation.
 
Vcs16
Vcs16Vcs16
Vcs16
 
F# Presentation
F# PresentationF# Presentation
F# Presentation
 
booksoncprogramminglanguage-anintroductiontobeginnersbyarunumrao4-21101016591...
booksoncprogramminglanguage-anintroductiontobeginnersbyarunumrao4-21101016591...booksoncprogramminglanguage-anintroductiontobeginnersbyarunumrao4-21101016591...
booksoncprogramminglanguage-anintroductiontobeginnersbyarunumrao4-21101016591...
 
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...
 

Recently uploaded

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 

Recently uploaded (20)

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

Part 7

  • 2. Farsi e-learning series &'& ! " # $ !% #include <iostream.h> #include <conio.h> int calc(int [],int dim); void revmatrix( int [],int dim); void main() { int matrix[1000]; int dim,temp; double leftsum,rightsum; cout<<" PLEASE ENTER MATRIX DIMANTION : "; cin>>dim; cout<<"nnn"; for( int i = 0;i<( dim*dim );i ++ ) { cout<<"ENTER ELEMAN : "; cin>>temp; matrix[i] = temp; clrscr(); cout<<" PLEASE ENTER MATRIX DIMANTION : "<<dim; cout<<"nnn"; }//for i if ( dim > 2 ) { leftsum = calc( matrix , dim ); cout<<"LEFTSUM of the matrix = "<< leftsum <<"nn"; revmatrix( matrix , dim ); rightsum = calc( matrix ,dim ); cout<<"RIGHTSUM of the matrix = "<< rightsum <<"nnnnnn" ; cout<<" ( DETERMINAN OF THE MATRIX = "<< leftsum - rightsum<<" )"; } else cout<<" ( DETERMINAN OF THE MATRIX = "<<(matrix[0] * matrix[3] - matrix[1] * matrix[2])<<" )"; getch(); }//end main /////////////////calc function////////// int calc( int matrix[ ], int dim ) { int sum = 0, bul, x = 1; for( int l = 0; l<( dim*dim );l += ( dim+1 ) )//ghotr asli x *= matrix[l]; sum = x; x = 1; for( int c = 1;c<dim;c ++ ) { bul=c; for( int m = 0;m<dim;m ++ ) { if( ( bul+1 )%dim != 0 ) { x *= matrix[bul];
  • 3. Farsi e-learning series bul +=( dim + 1 ); } else { x = x * matrix[bul]; bul += 1; } }//for m sum += x; x = 1; }//for c return sum; } ////////////////////revmatriv determinan void revmatrix(int matrix[ ],int dim) { int end,temp,counter; for( int t = dim-1;t <= dim*dim;t = t + dim ) { end=t; counter = end -( dim-1 ); while( end > counter ) { temp = matrix[end]; matrix[end] = matrix[counter]; matrix[counter] = temp; ++ counter; -- end; } } } / 0 ,- -123 * % * % $4 ) " %* * 5 67 * ,89 : ; " , 0 " % ) * + ,- , . =< ,. % % % * ,89 : %* * 5 ,- , 0 % ) #include <iostream.h> int main() { int i,j; double a[512],b; cout<<”How many content do you want to enter ?:”; cin >>i; cout<<”Enter “<<i<<” contents :”; for(j=0;j<i;j++) cin>> a[j]; cout<<”Enter a keyword to search in your array : “; cin >> b; (
  • 4. Farsi e-learning series for(j=0;j<i;j++) { if (a[j]==b) { break; } } if (j>=i) cout << "not found" << endl; else cout <<”Hurray !! your searched content is in this row : “<< j << endl; return 0; } >
  • 5. Farsi e-learning series ,8 J% 9 3 7 # !3 8- - ,8 % % I% 3 C ;! 8- - D E ,- @7 , 05 3F . ,GH = @A$. %% 5 B . ,8 I% - % ,4. 8- - , 8- -D E III * D F I 3 QRSS O P ) ,- 3 MN 8- - ,8 K8. @ LF % 3 % % X . 5 D E Y$ . 3 ,8 ,- 8- -B .5 , 0" % % TUVVW D F L T U V V W MN I -" - , 8- - ,8 " # P #* F . !3 [A 5 $A % MN 8- - Z * % I @9 : 8- - , 8- - D E # ! 3 Y @9 : - D E % F $8 " ) . #0 # ! 3 Y 8- - ,8 " ) /89 : b% - % `87 * a* 5 # ! 3 ,8 $8 C ;! # 5 % ^)9 ,8 _ ] Char ali[26]=”WWW.MRH.IR”; Char aida[26]={ ‘m’ , ‘a’ , ‘j’ , ‘i’ , ‘d’ } I $ % f. Y ,)Hc " Y * de& Y @_ c*% / $8A. ! 3 Z * % ,- I Y$ - 3 c " B* -12 ,8 + * ,89 : ,8 " ,- $A , . #include <iostream.h> int main() { char a[64]; int i,c; cout<<"Enter a strings:"<<endl; cin>>a; for(int i=0; a[i]!='0'; i++); cout<<"Size of string : " <<i<<endl; return 0; } I% 3 5D E J -12 .0 + * ,89 : ,8 3; % f. g - /$ ,- Y$A 3; ! Y$ h : #include <iostream.h> void size(char a[],char b[]) { int i; for(i=0; a[i]!='0'; i++); cout<<"Size of string : " <<i<<endl; } int main() { char a[64]; int i,c; cout<<"Enter a strings:"<<endl; cin>>a; size(a); return 0; } - 36- 3_* % 3 *% * ,89 : ,8 ) *% ,- $A , . ( ?
  • 6. Farsi e-learning series #include <iostream.h> int main() { char a[64],b[64]; cout<<"Enter 2 strings:"<<endl; cin>>a; cin>>b; int i=0; do{ a[i]=b[i]; }while(b[i++]!='0'); a[i]='0'; return 0; } I $ % f. E9 / 0D ! 8j$ 3 0 * 8K / ! 8A d I ,. h 8- % 3 Z ! %J . 0 a5 / E9 0 % ,- 3 / ! - )! I . 3 C ;! lmne&oIT ,. h 8- % 8A ,8 -, k ,- J ,. h 8- Z ! / IY 5 % P 3 #0 , * , ,- J % % $A p 9 3A . , . # 5 4% J# 5/ % ,8 $8 ,- J 6A + ,8G. / k 9 7 q$r ! Z ! smne&oIT I $ , ,8 " + smnVU&bt] smne&oIT I - 3 36- 4 % % ,8 smnduvbtwx] smne&oIT I - 3 36- 8- - & % ;! , - c 4% % ,8 smn&duvbtwxw&] smne&oIT I -3 GF ,8 ) smnnUybt] smne&oIT I -3 E8 Y , K.0 * ,89 : ,8 *% smndtmbtwx] smne&oIT I ,8 % 8- - & - c z c ,8 ,G { I - 3 E8 Y , ,8 *% smn&dtmbtwxw&] smne&oIT 3 J% 8: } 3 *% : J . % : 3 % 8: } 3_* : * - 3 ,j ) ,8 *% smnd|ubtwx] I .% : 3 N .% : * .% : smne&oIT I .% : 3 g . ,f$8. * -3 ,A ) Y ,8 *% 5 * 8- - Q smn&d|ubtwxw&] i
  • 7. Farsi e-learning series D ! I - 36- 3_* % 3 *% * ,89 : ,8 *% ,- $A 3; ! ,G 3 ; I $ G Z ! , ! ( I .% : .% : * . % : N J % 8: } 3 *% : I . % : J % 8: } 3_* : * % $4 ,8 *% ,- $A 3; ! I % 3_* % *% ,8 @ K. % * % - ,A ) K.0 g / ! . J 1 2 - + J ,89 : ,8 *% ,- $A , . ( b ,89 : %* * 5 & ] I % f. ,8 * 8- - & * / ! ,- $A , . > I - E8 4 , K.0 * ,89 : ,8 *% Z ! " 5 % `87 ,- $A , . ? b ,89 : %* * 5 & ] I % ,f$8. % K.0 5 ,8 & * % - E8 Y , ,8 *% 3; ! 5 % `87 ,- $A , . i I - GF ,8 ) " 3; ! 5 % `87 ,- $A , . ~ "# $ % & ! ., /,& ! '( ) *+ , - , www.mrh.ir www.majidonline.com (•? 1 0 2 3 ,& , 45 6 789 ':) ; < ~