Professional Documents
Culture Documents
com
www.IrPDF.com
" # $ !%
#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<<"\n\n\n";
for( int i = 0;i<( dim*dim );i ++ )
{
cout<<"ENTER ELEMAN : ";
cin>>temp;
matrix[i] = temp;
clrscr();
cout<<"
PLEASE ENTER MATRIX DIMANTION : "<<dim;
cout<<"\n\n\n";
}//for i
if ( dim > 2 )
{
leftsum = calc( matrix , dim );
cout<<"LEFTSUM of the matrix = "<< leftsum <<"\n\n";
revmatrix( matrix , dim );
rightsum = calc( matrix ,dim );
cout<<"RIGHTSUM of the matrix = "<< rightsum <<"\n\n\n\n\n\n" ;
cout<<"
( DETERMINAN OF THE MATRIX = "<< leftsum - rightsum<<" )";
}
else
cout<<"
* 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];
www.IrPDF.com
{
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;
(
www.IrPDF.com
>
www.IrPDF.com
8- -
,8
% % I%
3 C ;!
I
3 QRSS O P )
% % X . 5 D E Y$ . 3 ,8
T
I
I @9 : 8- - ,
8- - D E # ! 3 Y
-" -
@9 :
8- - D E ,- @7
8- -
, 05
I% ,,8-
3F . ,GH = @A$.
% ,4. 8- - , 83 MN
8- -B .5 , 0"
,8
%% 5
B . ,8
-D E
III * D F
,8
K8. @ LF
% % TUVVW D F L
MN
,8
" # P #* F
. !3
[A 5
- D E % F $\8 "
)
.
#0 # ! 3 Y
b% - % `87 * a* 5 # ! 3
$A % MN
8- - Z * %
8- ,8
"
) /89 :
,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&
-12
@_ c*% /
$8A. ! 3 Z * % ,-
I Y$ - 3
c
" B*
+ * ,89 : ,8
" ,- $A
,8
, .
#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%
5D E J
-12
.0
+ * ,89 :
,8
3;
f.
- /$
,- Y$A
3; ! Y$
#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
, .
www.IrPDF.com
I $ % f.
E9 /
0D
8A d
,. h 8- % 3
Z !
%J .
0 a5
/
I .
3 C ;! lmne&oIT
,. h 8- % 8A
,8
, ,- J % % $A p 9 3A . , .
# 5 4% J# 5/ %
,8
! 8j$ 3
0 * 8K / !
E9 0 % ,- 3
/ ! )!
-, k
,- J
,. h 8- Z ! /
$\8 ,- J
6A +
,8G. /
IY 5 % P 3 #0 , *
9 7
q$r !
smne&oIT
smne&oIT
smne&oIT
smne&oIT
smne&oIT
smne&oIT
smne&oIT
smne&oIT
I
3
,8
J%
"
8: } 3 *% : J . % : 3
%
I .% : 3
N .%
g
,f$8. *
-3
,8
)
K.0 * ,89 : ,8
,G { I - 3
8: } 3_* : *
: * .% :
,A ) Y
Z !
smnVU&bt]
smnduvbtwx]
smn&duvbtwxw&]
smnnUybt]
smndtmbtwx]
smn&dtmbtwxw&]
I - 3 36- 4 % %
,8
- 3 36- 8- - & % ;! , - c
4% %
I -3
GF
I -3
E8 Y ,
% 8- - & - c z c
,8
I .% : 3
,8
,8
,8
*%
E8 Y ,
- 3 ,j )
*% 5
,8
*%
,8
* 8- - Q
*%
smnd|ubtwx]
smn&d|ubtwxw&]
www.IrPDF.com
"# $ % &
., /,&
'( )
*+ , -
www.mrh.ir
www.majidonline.com
(? 1
2 3
,& , 45
6 789 ':) ;
<
(
3; !
, .
, .
, .
, .
, .
(
>
?
i
~