7. ِّدىعذاجبَعًٌّق ّبٍحشث امزت
#include<iostream.h>
#include<conio.h>
{void main()
clrscr();
int x=10,y=20, s;
s=x+y;
cout<<"x+y="<<s;
getch();
ّبشثامزتًادلغزخذقجوٍِادخبذلَبٌّز ِّعذدجلَع ٍح
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int x,y,s;
cout<<"Enter the number x: ";
cin>>x;
cout<<"Enter the number y: ";
cin>>y;
s=x+y;
cout<<"x+y="<<s;
}getch();
X=10 , y=20
8. z
ّبشثامزتِّريٍزغثني ىقغَوا ًِثبق ًطشذًضشةمجع ىْدبد ٍح
ًادلغزخذٍِادخبذلَب ٌّز
#include<iostream.h>
#include<conio.h>
void main(){
clrscr();
int x , y ;
cout<<"Enter the number x: ";
cin>>x;
out<<"Enter the number y: ";
cin>>y;
+y<<endl;cout<<"x+y="<<x
y<<endl;-y="<<x-cout<<"x
cout<<"x*y="<<x*y<<endl;
cout<<"x/y="<<x/y<<endl;
cout<<"x%y="<<x%y<<endl;
}getch();
48. z
ىزنشاساعذدالجيبدّبٍحشثِّغاىشا فٌق يف ىصفشاادلصفٌفو
ىثنبئْوا3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] , k =0;
( int i=1;i<=3 ;i++){for
for ( int j=1;i<=3 ;i++){
cin>>a[i] [j] ; }}
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=3 ;i++){
if (i<j)&&( a[i] [j] ==0)
k++; }
cout<<k ;}}
getch() ;}
57. ىقطشا فٌق يف قَْو اصغش الجيبدّبٍحشثٌُّبث
3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
Int min =a[0] [0] ;
for ( int i=1;i<=3 ;i++){
int j=1;i<=3 ;i++){for (
cin>>a[i] [j] ; }}
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=3 ;i++){
2)&&(a[I][j]<min){if( i+j<
min=a [i][j];}}}
cout<<min;
getch() ;}
(0,0) (0,1) (0,2)
(1,0) (1,1) (1,2)
(2,0) (2,1) (2,2)
58. z
ىزنشاساعذدالجيبدّبٍحشثِّغاىشا حتذ يف ىصفشاادلصفٌفو
ىثنبئْوا3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] , k =0;
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=3 ;i++){
cin>>a[i] [j] ; }}
for ( int i=1;i<=3 ;i++){
i++){for ( int j=1;i<=3 ;
if (i+j>2)&&( a[i] [j] ==0)
k++; }
cout<<k ;}}
getch() ;}
60. z
ثنبئْوٍصفٌفزنيجلَع ّبٍحشث3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
Int b[3] [3] ;
Int c[3] [3] ;
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=3 ;i++){
cin>>a[i] [j] ; }}
;i++){for ( int i=1;i<=3
for ( int j=1;i<=3 ;i++){
cin>>b[i] [j] ; }}
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=3 ;i++){
; }}c[i] [j]= c[i] [j] +a[i] [j] +b[ i] [ j]
;cout<<c[ I ] [ j ]
getch() ;}
Loopادخال
b[i][j]
Loopطباعه
Loopادخال
a[i][j]
61. ّبٍحشثزبصوضشةٍصفٌفزني* (2*4)(3*2)
Include<iostream.h>#
ude<conio.h>incl#
void main{
Clrscr() ;
Int a[3] [2] ;
Int b[4] [2] ;
Int c[3] [3] ;
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=2 ;i++){
cin>>a[i] [j] ; }}
for ( int i=1;i<=2 ;i++){
for ( int j=1;i<= 4 ;i++){
cin>>b[i] [j] ; }}
for ( int i=1;i<=3 ;i++){
( int j=1;i<=4 ;i++){for
for ( int k=1;i<=2 ;i++){
c[i] [j]= c[i] [j] +a[i] [k] * b[ k] [ j]; }}
cout<<c[ I ] [ j ];
getch() ;}