SlideShare a Scribd company logo
1 of 66
Download to read offline
0
z
z
1-" "‫اقزجبط‬‫عالٍو‬ً‫ّغزخذ‬ ‫ىنص‬‫ا‬‫ىطجبعو‬‫ا‬‫ىغؤ‬‫ا‬‫يف‬‫ادلطيٌة‬ُ‫:ارامب‬
"text"
2-nً‫ّغزخذ‬‫عطش‬‫حتذ‬‫عطش‬‫طجبعو‬‫:عنذ‬)n(ً‫اعزخذا‬ً‫ا‬endl
3-t:ً‫ّغزخذ‬(t‫ىنيَو‬‫ا‬‫ثني‬‫ادلغبفو‬‫رشك‬‫يف‬)
4-‫ٍالزض‬‫و‬:‫ادلزغري‬‫ىْظ‬ً‫ادلزغري‬ ‫قَْو‬‫ثطجبعو‬ًٌ‫ّق‬‫اقزجبط‬‫عالٍو‬‫ًضع‬ً‫عذ‬‫عنذ‬‫ّفغو‬
5-‫ٍالزضو‬‫مو‬:‫عطش‬‫يف‬‫ىربرلو‬‫ا‬ِ‫ّنزي‬‫ثفبسصه‬‫ٍنقٌطو‬
6-int:‫رغز‬ً‫خذ‬‫عنذ‬‫مزبثخ‬ُ‫أ‬‫ّبٍح‬‫ش‬‫ث‬‫ثيغخ‬++C،‫اىل‬‫حنزبج‬‫ّف‬‫ش‬‫رع‬‫ادلزغرياد‬
7-char:‫ىشٌٍص‬‫ا‬ً‫االزشف‬‫ّف‬‫ش‬‫ىزع‬ ً‫رغزخذ‬
8-)Clrscr(:‫ىشبشو‬‫ا‬‫دلغر‬‫ّعبص‬‫ال‬‫ا‬‫ىزا‬ً‫ّغزخذ‬
9-Float:‫ّو‬‫ش‬‫ىعش‬‫ا‬‫احلقْقْو‬‫ىالعذاد‬ ً‫ّغزخذ‬
11-Getch():‫ىشبشو‬‫ا‬‫ىزثجْذ‬‫ّعبص‬‫ال‬‫ا‬‫ىزا‬ً‫ّغزخذ‬
11-hmath.:‫ّبضْو‬‫ش‬‫ى‬‫ا‬‫ادلعبدالد‬‫يف‬‫ادلنزجو‬‫ىزه‬ً‫رغزخذ‬
12-cin:‫ّعبص‬‫ال‬‫ا‬ً‫ّغزخذ‬‫ادلزغري‬ ‫قَْو‬‫ىذخبه‬
z
‫أمزت‬‫ّبٍح‬‫ش‬‫ث‬ًٌٌّ‫ق‬‫ثنزبثخ‬‫ىنيَبد‬‫ا‬‫ٌْو‬‫ى‬‫ب‬‫ىز‬‫ا‬Welcome to c++
include<iostream.h>
#include<conio.h>
void main(){
clrscr();
cout<<"welcome to c++";
getch();}
ِّ‫د‬‫عذ‬ ‫جبَع‬ ًٌ‫ّق‬ ‫ّبٍح‬‫ش‬‫ث‬ ‫امزت‬11ً21
#include<iostream.h>
#include<conio.h>
void main() {
clrscr();
cout<<"10+20="<<10+20;
getch(); }
ِّ‫د‬‫ىعذ‬‫ا‬‫جبَع‬ًٌ‫ّق‬ ‫ّبٍح‬‫ش‬‫ث‬ ‫امزت‬
#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
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();
‫ّبٍح‬‫ش‬‫ث‬‫ٍغبزو‬‫حلغبة‬‫ادلثيث‬
include<iostream.h>#
include<conio.h>#
void main(){
Clrscr() ;
Int a,b ,h ;
Cout<<”enter b”;
Cin>>b;
Cout<<”enter h”;
Cin>>h;
A =
Cout<<a;
Getch() ;}
‫ٍغبزو‬‫حلغبة‬ ‫ّبٍح‬‫ش‬‫ث‬‫ىذائشه‬‫ا‬
include<iostream.h>#
include<conio.h>#
void main(){
Clrscr() ;
Int a ,r;
=A
;<<ACout
Getch () ;}
z
‫ادلغزطْو‬‫ٍغبزو‬‫ىْدبد‬‫ّبٍح‬‫ش‬‫ث‬
include<iostream.h>#
include<conio.h>#
void main(){
Clrscr() ;
;Int a ,l , w , l
A=l * w ;
Cout<<A;
Getch () ;}
:‫ًاخت‬ ‫عؤاه‬
‫ادلشثع‬‫ٍغبزو‬‫ىْدبد‬‫ّبٍح‬‫ش‬‫ث‬ - 1
ً‫اذلش‬ ٌ‫زد‬‫ىْدبد‬‫ّبٍح‬‫ش‬‫ث‬ -2
‫ىعذد‬‫ا‬ ‫ّغزقجو‬‫ثشّبٍح‬ٍِ‫امرب‬ُ‫مب‬ٍ‫ّش‬ٌ‫ث‬‫ادخيزو‬ُ‫ىز‬‫ا‬01ٍِ‫اصغش‬ ً‫ا‬01
>include<iostream.h#
>include<conio.h#
(){void main
() ;lrscrC
,x;iint
";cout<<"Enter the number
cin>>x;
<<"i >10";cout
else
10";<<"i <cout
}getch();
‫ّبٍح‬‫ش‬‫ث‬‫ّغزقجو‬‫ىعذد‬‫ا‬ٌ‫ث‬ٍ‫ّش‬ُ‫مب‬‫ٌٍخت‬ً‫ا‬‫ىت‬‫ب‬‫ع‬
>io.hinclude<con#
(){void main
clrscr();
I;int
I;cin>>
)if(i<0
";<<" : negativecout
else
";<<" : positivecout
getch();}
z
‫ّو‬‫د‬‫ىفش‬‫ا‬ً‫ىضًخْو‬‫ا‬‫االعذاد‬‫ىطجبعو‬ ‫ثشّبٍح‬
include<iostream.h#
#include<conio.h>
{Void main()
;)(clrscr
int I;
";icout<<"Enter the
;cin>>i
if(i%2= =0)
";cout<<"even
else
<<"odd";cout
getch();}
‫قَْو‬‫ًصغش‬‫قَْو‬‫امرب‬‫ىطجبعو‬‫ثشّبٍح‬
>include<iostream.h#
#include<conio.h>
Void main(){
;)(clrscr
int I;
;cin>>i
)i<0if(
";maxcout<<"
else
;min"cout<<"
getch();}
ُ‫ّقبس‬ٌ‫ث‬‫ٍزغرياد‬‫ثالثو‬‫ىذخبه‬‫ثشّبٍح‬‫ثْنيَب‬
include<iostream.h#
#include<conio.h>
Void main(){
;)(clrscr
;int x,y,z
{)x>y&& x >zif(
}";xmaxcout<<"
if (y>x && y>z){else
";max ycout<<"
else
cout<<”max z”
getch();}
‫ىط‬‫ثشّبٍح‬‫االعذاد‬‫جبعو‬( ‫مخغو‬ َ‫عي‬ ‫ىقغَو‬‫ا‬‫رقجو‬ َ‫ىز‬‫ا‬0,011)
include<iostream.h>#
include<conio.h>#
void main(){
clrscr();
int I;
for (i=1;i<=100;i++){
if( I % 5==0)
};Icout<<
getch();}
z
(‫االعذاد‬‫ىطجبعو‬‫ثشّبٍح‬0,011)
include<iostream.h>#
>include<conio.h#
void main(){
clrscr();
int I;
for (i=1;i<=100;i++){
cout<<i;}
getch();}
‫ىو‬‫د‬‫ادلعب‬‫زو‬‫الجيبد‬ ‫ثشّبٍح‬
𝑥+3
𝑥−4
y=
>include<iostream.h#
#include<conio.h>
Void main(){
;)(clrscr
;int x, y
cin>>x;
4 ;-y =x+3 % x
cout<<y ;
}getch() ;
ّ‫ش‬‫ث‬‫ىنبرح‬‫ا‬‫الجيبد‬‫بٍح‬y=
>include<iostream.h#
#include<conio.h>
{()Void main
;)(clrscr
int x, y;
cin>>x;
{if (x > 1)
y =x+2 ;
};cout<<y
else if (x<1) {
Y=x+1;
}y ;cout<<
{else (x=1)
y=x+3;
}<y;cout<
‫االرْو‬‫ىو‬‫د‬‫ادلعب‬‫حلو‬‫ّبٍح‬‫ش‬‫ث‬𝑥5
+ 𝑥=y
include<iostream.h>#
#include<conio.h>
#include<math.h>
Void main(){
;)(clrscr
int x, y;
cin>>x;
y=pow(x ,5) +pow(x ,7) ;
;cout<<y
getch ( ) ;}
‫لكم‬ ‫تحياتي‬ ‫مع‬
‫ي‬‫المعمور‬ ‫ميثاق‬
z
‫ىو‬‫د‬‫ادلعب‬‫حلو‬‫ثشّبٍح‬𝑥9
+ √ 𝑥y=
m.h>include<iostrea#
#include<conio.h>
#include<math.h>
Void main(){
int x, y;
cin>>x;
y=pow(x ,9) + sqrt(x) ;
cout<<y;
getch() ;}
‫ادلعبدال‬‫:زو‬‫ًاخت‬‫عؤاه‬‫د‬‫االرْو‬
‫ىو‬‫د‬‫ادلعب‬‫حلو‬‫ثشّبٍح‬√𝑥5y=
include<iostream.h>#
ude<conio.h>#incl
#include<math.h>
Void main(){
;)(clrscr
int x, y;
cin>>x;
y= sqrt(pow(x,5)) ;
cout<<y;
getch() ;}
‫ىو‬‫د‬‫ادلعب‬‫حلو‬‫ّبٍح‬‫ش‬‫ث‬√𝑥5 + √ 𝑥y=
include<iostream.h>#
#include<conio.h>
#include<math.h>
Void main(){
;)(clrscr
int x, y;
cin>>x;
t(pow(x,5))+sqrt(x) ;y= sqr
cout<<y;
getch() ;}
‫لكم‬ ‫تحياتي‬ ‫مع‬
‫م‬‫ي‬‫المعمور‬ ‫يثاق‬
z
ً‫ثأعزخذا‬ ‫ىو‬‫د‬‫ادلعب‬ ‫حلو‬ ‫ّبٍح‬‫ش‬‫ث‬
include<iostream.h>#
#include<conio.h>
Void main(){
;)(clrscr
int y , x ;
char x;
cout<<”entr x”;
cin>>x;
switch(x){
case 1 : y=x+1 ; cout<<y; ;break ;
: y=x+6 ; cout<<y; ;break ;case 4
case 4 : y=x+6 ; cout<<y; ;break ;
default: cout<<”the number is unknun” }
getch () ;}
‫ًاخت؟‬‫عؤاه‬
ً‫ثأعزخذا‬‫ىو‬‫د‬‫ادلعب‬‫حلو‬‫ّبٍح‬‫ش‬‫ث‬‫امزت‬‫قبعذه‬switch
Y=
‫احلبعجو‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬‫ّو‬ً‫ّذ‬
lude<iostream.h>inc#
#include<conio.h>
Void main(){
;)(clrscr
int y , x ;
char op ;
cout<<”entr x”;
cin>>x;
cout<<”entr y”;
cin>>y ;
) or(+) or(%)or(*) ”;-cout<<”entr (
cin>>op;
{switch(op)
break;;cout<<x<<"*"<<y<<"="<<x*ycase '*':
;;break"+"<<y<<"="<<x+ycout<<x<<case '+':
;;breaky-"<<y<<"="<<x-cout<<x<<"':-case '
;;breakcout<<x<<"/"<<y<<"="<<x/ycase '/':
default: cout<<”the opration is unknun”<<op; }
getch ();}
z
‫ّبٍح‬‫ش‬‫ث‬‫ّذخو‬‫ىطالة‬‫ا‬‫ىذسخبد‬‫ا‬‫ّش‬‫ذ‬‫ىزق‬‫ا‬‫ّجني‬ٌ‫ث‬‫ىطالة‬‫ا‬
>include<iostream.h#
#include<conio.h>
Void main(){
;)(clrscr
int x;
cout<<"Enter the x";
cin>>x;
{x<=100))(x>=90)&&((if
l;}cout<< " : Excellent "<<end
ifelse
{))70)&&(x<80>=x((
; }ery Good "<<endlcout<< " : V
ifelse
){)69)&&(x<0x >=6((
cout<< " : Good "<<endl;}
ifelse
{))59(x>=50)&&(x<(
cout<< " : Accepted "<<endl;}
else
){)(x< 50)&&(x>=0(if
"<<endl;}dcout<< " fail
getch();}
‫لكم‬ ‫تحياتي‬ ‫مع‬
‫ي‬‫المعمور‬ ‫ميثاق‬
ً‫ادلغزخذ‬ ‫قجو‬ٍِ‫ىضشة‬‫ا‬‫خذًه‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬‫امزت‬
#include<iostream.h>
#include<conio.h>
void main() {
clrscr();
int I , j , x ;
cout<<"Enter the number : ";
cin>> x ;
for (i=1;i<=x;i++) {
cout <<end l ; }
for (j=1 ; j<=x ; j++) {
cout<<i<<"*"<<j<<"="<<i*j<<" ";
cout<<endl ; }
getch( ) ; }
z
02– 0ٍِ ‫اىضشة‬‫اجلذًه‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬
#include<iostream.h>
#include<conio.h>
void main() {
clrscr();
int i , j ;
for (i=1 ; i<=12 ; i++) {
cout<<end l ; }
for (j=1 ; j<=12 ; j++) {
cout<<i<<"*"<<j<<"="<<i*j<<" ";
cout<<endl ; }
getch() ;
ً‫ثأعزخذا‬ 02,0‫االعذاد‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬
include<iostream.h>#
#include<conio.h>
void main() {
clrscr();
int i=1;
do {
cout<<I ;
i++;
while ( i<=12) ; }
getch () ;}
(‫ىضًخْو‬‫ا‬‫االعذاد‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬0,011ً‫اعزخذا‬ )do …while
.h>Include <iostream#
Include <conio.h>#
void main (){
clrscr () ;
int i=0;
do {
;Icout<<
};i+=2
while (i<=10) ; }
getch();}
Do……….while
z
(‫ىضًخْو‬‫ا‬‫االعذاد‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬0,011‫اع‬ )ً‫زخذا‬while
<iostream.h>ncludeI#
<conio.h>ncludeI#
(){mainvoid
;()clrscr
=0;int i
while( i<=100)
cout<<I;
};i+=2
getch();}
ٍِ‫االعذاد‬‫جبَع‬ًٌ‫ّق‬‫ّبٍح‬‫ا‬‫ثش‬(0,011)
include<iostream.h>#
include<conio.h>>
void main(){
clrscr();
int i,s=0;
for(int i=1;i<=100;i++){
s=s+i;}
cout<<s;
getch();}
ً‫اعزخذا‬‫ثظ‬‫ىغؤاه‬‫ا‬‫ّفظ‬while
stream.h>#include <io
#include<conio.h>
Void main ( ) ; {
Clrscr( ) ;
int i=1;
int s=0;
(i<=100)ewhil
i++;
s=s+i;}
cout<<s;
getch();}
‫ث‬‫ّبٍح‬‫ش‬‫ال‬‫دخبه‬‫دسخبد‬‫عششه‬
#include <iostream.h>
#include<conio.h>
Void main ( ) ; {
Clrscr( ) ;
int x;
i++);9for(int i=0;i<=
in>>x;c
<<i;cout
Getch () ;}
‫لكم‬ ‫تحياتي‬ ‫مع‬
‫ي‬‫المعمور‬ ‫ميثاق‬
z
*
* *
* * *
* * * *
* * * * *
‫ّبٍح‬‫ش‬‫ث‬‫ىطجبعو‬‫ىشنو‬‫ا‬‫ىزبيل‬‫ا‬
include<iostream.h>#
include<conio.h>#
{void main
r();lrscC
{++)i=1;i<=5;iintfor (
{;lout<<endc
{1++)j=1;j<=i;jintfor (
}COUT<<"*";
Getch();}
ِ‫االر‬‫ىشنو‬‫ا‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬
TREAM.h>include<IOS#
include<conio.h>#
void main{
Clrscr();
for ( int i=1;i<=5;i++)
{cout<<endl;
j++);Ifor ( int j=1;j<=
;COUT<<I
Getch();}
ِ‫االر‬‫ىشنو‬‫ا‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬
#include<iostream.h>
#include<conio.h>
void main() {
clrscr();
int I , j , m , n ;
for (i=0;i<5;i++) {
cout<<endl; }
for (j=10;j>=0;j--){
if(j>5+i || j<5-i) {
cout<< " "; }}
else
cout<< " * ";} }
for (m=4 ; m>0 ; m--) {
cout<<endl;
for (n=10 ; n>=0 ; n--) {
if(n>4+m || n<=5-m) {
cout<< " "; }}
else
cout<< " * ";} }
getch();
*
***
*****
*******
*********
*******
*****
***
*
z
‫ميَو‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬hello‫ٍشاد‬‫عششه‬
include<istream.h>#
include<conio.h>#
void main{
Clrscr();
int I;
for ( int i=1;i<=10;i++){
cout<<”hello”;}
getch();}
ً‫ثغزخذا‬‫ىغؤاه‬‫ا‬‫ّفظ‬while
INCLUDE<IOSTREAM.H>#
include<conio.h>#
void main{
Clrscr();
i=1;int
While(i<=10){
Cout<<”hello”;
I++;}
Getch();}
‫لكم‬ ‫حتياتي‬ ‫مع‬
‫املعموري‬ ‫ميثاق‬
‫ىعذد‬‫ا‬‫ٍفنٌك‬‫ىْدبد‬‫ّبٍح‬‫ش‬‫ث‬6
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr();
Int f=1;
for ( int i=1;i<=6;i++){
};I*f=f
cout<<f;
Getch();}
‫ٍفنٌك‬‫ىْدبد‬‫ّبٍح‬‫ش‬‫ث‬n
Include<iostream.h>#
lude<conio.h>inc#
void main{
Clrscr();
f=1;,Int n
Cin>>n;
;i++){for ( int i=1;i<=n
f=f*I;}
cout<<f;
Getch();}
z
‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬‫زدَيب‬‫ّو‬‫د‬‫ازب‬‫ٍصفٌفو‬‫عششه‬
#include<iostream .h>
include<conio.h>#
void main{
Clrscr() ;
Int a[10] ;
for ( int i=1;i<=10 ;i++){
cin>>a[i];}
for ( int i=1;i<=10 ;i++)
cout<<a[i];}
getch();}
:‫ًاخت‬ ‫عؤاه‬
‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬ ‫أمزت‬‫ٍصفٌفو‬‫االرْو‬
:‫ًاخت‬ ‫عؤاه‬
‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬ ‫أمزت‬ِ‫افق‬ ‫ثشنو‬‫عششه‬ ‫زدَيب‬‫ّو‬‫د‬‫ازب‬‫ٍصفٌفو‬
24
42
21
42
23
4
‫رلٌَع‬ ‫ىْدبد‬‫ّبٍح‬‫ش‬‫ث‬‫يف‬‫ىضًخْو‬‫ا‬‫االعذاد‬‫زدَيب‬‫ادلصفٌفو‬01
e<iostream.h>Includ#
include<conio.h>#
void main{
Clrscr() ;
Int a[10] ;
Int sum=0 ;
for ( int i=1;i<=10 ;i++){
cin>>a[i] ; }
for ( int i=1;i<=10 ;i++) {
if( a[i] %2==0)
; }+a [i]sum=sum
cout<<sum ;
Getch ( ) ;
‫رلٌَع‬ ‫ىْدبد‬‫ّبٍح‬‫ش‬‫ث‬‫يف‬ ‫ّو‬‫د‬‫ىفش‬‫ا‬‫االعذاد‬‫زدَيب‬‫ادلصفٌفو‬01
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[10] ;
Int sum=0 ;
for ( int i=1;i<=10 ;i++){
cin>>a[i] ; }
for ( int i=1;i<=10 ;i++) {
if( a[i] %2==1)
; }+a [i]sum=sum
cout<<sum ;
Getch ( ) ;
z
‫ىْدبد‬‫ّبٍح‬‫ش‬‫ث‬ِ‫احلغبث‬ ‫ادلزٌعط‬‫زدَيب‬‫ادلصفٌفو‬01
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[10] ;
sum=0 , avrg ;Int
for ( int i=1;i<=10 ;i++){
cin>>a[i] ; }
for ( int i=1;i<=10 ;i++) {
;+a [i]sum=sum
avrg=sum% a[i] ;
cout<<sum ;
Getch ( ) ;
‫زدَيب‬‫ادلصفٌفو‬‫رلٌَع‬ ‫ىْدبد‬‫ّبٍح‬‫ش‬‫ث‬01
>Include<iostream.h#
include<conio.h>#
void main{
Clrscr() ;
Int a[10] ;
Int sum=0 ;
for ( int i=1;i<=10 ;i++){
};cin>>a[i]
{for ( int i=1;i<=10 ;i++)
};+a [i]sum=sum
;cout<<sum
}Getch ( ) ;
‫مهمه‬ ‫جدأ‬ ‫مالحظه‬‫االسئله‬ ‫:جمٌع‬
ً‫ف‬ ‫تغٌر‬ ‫ٌكون‬ ‫المصفوفات‬ ً‫ف‬
loopً‫الثان‬
ّ‫ش‬‫ث‬‫زدَيب‬ ‫ّو‬‫د‬‫االزب‬ ‫ثبدلصفٌفو‬‫قَْو‬‫امرب‬ ‫ىطجبععو‬‫بٍح‬01
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[10] ;
max=0;ntI
for ( int i=1;i<=10 ;i++){
};cin>>a[i]
for ( int i=1;i<=10 ;i++)
max)>a[i]if(
};a[i]=max
;cout<<max
}getch () ;
‫ثبدلصفٌفو‬‫قَْو‬‫اصغش‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬‫ّو‬‫د‬‫االزب‬
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[10] ;
INT min=0;
for ( int i=1;i<=10 ;i++){
cin>>a[i];}
for ( int i=1;i<=10 ;i++)
if(a[i]<min){
};]imin=a[
;cout<<min
getch ( ) ; }
z
‫ّبٍح‬‫ش‬‫ث‬‫ىزنشاس‬‫ا‬‫ىطجبعو‬5‫ادلصفٌفو‬‫يف‬‫ّو‬‫د‬‫االزب‬
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[10] ;
INT min=0;
for ( int i=1;i<=10 ;i++){
cin>>a[i];}
for ( int i=1;i<=10 ;i++){
if(a[i]==5){
k++;
;cout<<k
getch ( ) ; }
‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬‫ادلصف‬‫زدَيب‬‫ٌفو‬01ِ‫افق‬‫ثشنو‬
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[10] ;
for ( int i=1;i<=10 ;i++){
;}[i]acin>>
for ( int i=1;i<=10 ;i++)
};<< it “/cout<<”
tch() ;}ge
‫رليٌه‬‫زدَيب‬‫ٍصفٌفو‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬
Include<iostream.h>#
o.h>include<coni#
void main{
Clrscr() ;
Int a[10] ;
Int n;
Cin>>n;
;i++){nfor ( int i=1;i<=
cin>>a[i];}
;i++)for ( int i=1;i<= n
;}cout<< I
getch ( ) ; }
‫زدَيب‬‫ثنبئْو‬ ‫ٍصفٌفو‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬33x
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
a[3] [3] ;Int
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++){
for ( int j=1;i<=3 ;i++){
cout<<a[i] [j] ;}}
getch ( ) ; }
ٌ‫زد‬‫حبدض‬ًٌ‫ّق‬
‫قَْو‬‫ثأدخبه‬ًٌ‫ّق‬n
z
‫زدَيب‬‫ىثنبئْو‬‫ا‬ ‫ادلصفٌفو‬‫يف‬ ‫قَْو‬‫امرب‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬33x
Include<iostream.h>#
onio.h>include<c#
void main{
Clrscr() ;
;, max=a[0] [0]Int a[3] [3]
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++){
for ( int j=1;i<=3 ;i++){
if (a[i] [j] >max)
}}max=a[i] [j];
cout<<max;
getch ( ) ; }
‫مالحظ‬‫مهمه‬ ‫ه‬‫جدأ‬‫النهائٌه‬ ‫االسئله‬ ‫:اكثر‬
‫المصفوفات‬ ‫على‬ ً‫ه‬
‫ى‬‫ّبٍح‬‫ش‬‫ث‬‫ىثنبئْو‬‫ا‬ ‫ادلصفٌفو‬ ‫يف‬ ‫قَْو‬ ‫اصغش‬ ‫طجبعو‬3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] , min=a[0] [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++){
3 ;i++){for ( int j=1;i<=
min)<(a[i] [j]if
}}min=a[i] [j];
cout<<max;
getch ( ) ; }
z
‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬‫رلٌَع‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ,sum=a[0] [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++){
for ( int j=1;i<=3 ;i++){
sum =sum+a[i] [j]; }}
cout<<sum ;
getch ( ) ; }
‫ادلصفٌفو‬‫يف‬‫ىضًخْو‬‫ا‬ ‫االعذاد‬‫ىطجبعو‬ ‫ّبٍح‬‫ش‬‫ث‬3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
r ( int i=1;i<=3 ;i++){fo
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( a[i] [j] % 2==0)
cout<<a[i] [j]; }}
getch();}
: ‫ًاخت‬ ‫عؤاه‬
‫يف‬ ‫اسثعو‬ َ‫عي‬‫ىقغَو‬‫ا‬‫رقجو‬َ‫ىز‬‫ا‬‫االعذاد‬‫ىطجبعو‬ ‫ّبٍح‬‫ش‬‫ث‬‫امزت‬
‫ادلصفٌفو‬‫زدَيب‬‫ىثنبئْو‬‫ا‬4x3
z
‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬ ‫يف‬‫ّو‬‫د‬‫ىفش‬‫ا‬‫االعذاد‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
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++){
for ( int j=1;i<=3 ;i++){
if( a[i] [j] %2==1)
cout<<a[i] [j] ;}}
getch() ;}
:‫ًاخت‬‫عؤاه‬
‫زدَيب‬‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬‫يف‬ ‫ىجو‬‫ب‬‫ىغ‬‫ا‬‫االعذاد‬‫ىطجبعو‬ ‫ّبٍح‬‫ش‬‫ث‬‫امزت‬
4x3
‫ىزنشاس‬‫ا‬‫عذد‬‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬8‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬‫يف‬
Include<iostream.h>#
include<conio.h>#
oid main{v
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++){
for ( int j=1;i<=3 ;i++){
if( a[i] [j] ==8)
k++; }
cout<<k ;}}
}getch() ;
:‫ًاخت‬‫عؤاه‬
‫ر‬‫عذد‬‫ىطجبعو‬ ‫ّبٍح‬‫ش‬‫ث‬‫امزت‬‫يف‬ ‫اخلبٍظ‬‫ىعنصش‬‫ا‬‫ثعذ‬‫نشاس‬
‫زدَيب‬‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬4x3
z
‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬‫يف‬ ِ‫ّغ‬‫أ‬‫ىش‬‫ا‬‫ىقطش‬‫ا‬‫عنبصش‬‫ىطجبعو‬‫ّبٍح‬‫ش‬‫ث‬
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=3 ;i++){
[j] ; }}cin>>a[i]
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=3 ;i++){
if( i=j)
cout<<a[i] [j] ;}}
getch() ;}
(0,0) (0,1) (0,2)
(1,0) (1,1) (1,2)
(2,0) (2,1) (2,2)
‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬‫يف‬ ِ‫ّغ‬‫أ‬‫ىش‬‫ا‬‫ىقطش‬‫ا‬‫عنبصش‬ ‫رلٌَع‬‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬3x3
eam.h>Include<iostr#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
Int sum=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++){
for ( int j=1;i<=3 ;i++){
if( i=j)
sum=sum+a[i][j]; }}
cout<<sum ;
getch() ;}
z
ِ‫ّغ‬‫أ‬‫ىش‬‫ا‬‫ىقطش‬‫ا‬ ‫ىفٌق‬‫ا‬‫ىعنبصش‬‫ا‬‫رلٌَع‬‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬3x 3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
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++){
+){for ( int j=1;i<=3 ;i+
if( i<j)
sum+=a[i] [j];}}
cout<<sum ;
getch() ;}
(0,0) (0,1) (0,2)
(1,0) (1,1) (1,2)
(2,0) (2,1) (2,2)
ِ‫ّغ‬‫أ‬‫ىش‬‫ا‬‫ىقطش‬‫ا‬ ‫ىفٌق‬‫ا‬ ‫يف‬ ‫قَْو‬ ‫اصغش‬‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬3x 3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
3] ;Int a[3] [
Int max=a[0] [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++){
for ( int j=1;i<=3 ;i++){
if( i<j)&&(a[i] [j]< min)
min=a[i] [j];}}
cout<<max ;
getch() ;}
:‫ًاخت‬‫عؤاه‬
‫قَْو‬‫اصغش‬‫ىطجبعو‬ ‫ّبٍح‬‫ش‬‫ث‬‫امزت‬‫ادلصفٌفو‬‫يف‬ ‫ىث‬‫ب‬‫ىث‬‫ا‬‫ىعنصش‬‫ا‬‫ثعذ‬
‫زدَيب‬‫ىثنبئْو‬‫ا‬4x3
z
ِ‫ّغ‬‫أ‬‫ىش‬‫ا‬‫ىقطش‬‫ا‬ ‫ىفٌق‬‫ا‬ ‫يف‬ ‫قَْو‬ ‫امرب‬‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬3x 3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
Int max=a[0] [0] ;
for ( int i=1;i<=3 ;i++){
i++){for ( int j=1;i<=3 ;
cin>>a[i] [j] ; }}
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=3 ;i++){
)>max(a[i] [j]&&)i<jif(
max=a[i] [j];}}
cout<<max ;
getch() ;}
-1ً‫الرأٌس‬ ‫الفوق‬ ‫عناصر‬ ‫شرط‬
(i<j)
‫ىزنشاس‬‫ا‬‫عذد‬‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬8ِ‫ّغ‬‫ا‬‫ىش‬‫ا‬ ‫فٌق‬ ‫يف‬‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬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++){
for ( int j=1;i<=3 ;i++){
if (i<j)&&( a[i] [j] ==8)
k++; }
cout<<k ;}}
getch() ;}
:‫ًاخت‬‫عؤاه‬
‫ى‬ ‫ّبٍح‬‫ش‬‫ث‬‫امزت‬‫يف‬ ‫ىث‬‫ب‬‫ىث‬‫ا‬‫ىعنصش‬‫ا‬ ‫قجو‬‫ىزنشاس‬‫ا‬‫عذد‬‫طجبعو‬‫فٌق‬
‫زدَيب‬‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬ ‫يف‬ِ‫ّغ‬‫أ‬‫ىش‬‫ا‬3x5
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() ;}
‫ىعنبصش‬‫ا‬‫رلٌَع‬‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬‫حتذ‬ِ‫ّغ‬‫أ‬‫ىش‬‫ا‬‫ىقطش‬‫ا‬3x 3
.h>Include<iostream#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
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++){
for ( int j=1;i<=3 ;i++){
>j)iif(
sum+=a[i] [j];}}
cout<<sum ;
getch() ;}
-1‫عناصر‬ ‫شرط‬‫تحت‬ً‫الرأٌس‬
(i>j)
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++){
=1;i<=3 ;i++){for ( int j
j)&&( a[i] [j] ==0)if (i>
k++; }
cout<<k ;}}
getch() ;}
‫ىقطش‬‫ا‬ ‫ىعنبصش‬‫ا‬‫رلٌَع‬‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬ٌُّ‫ب‬‫ث‬3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
Int sum =0 ;
for ( int i=1;i<=3 ;i++){
t j=1;i<=3 ;i++){for ( in
cin>>a[i] [j] ; }}
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=3 ;i++){
if( i+j=2)
sum+=a[i] [j];}}
cout<<sum ;
getch() ;}
(0,0) (0,1) )(0,2
(1,0) )1,1( (1,2)
)2,0( (2,1) (2,2)
1+1 = 2
2+0 = 2
0+2 = 2
-1‫عناصر‬ ‫شرط‬‫الثانوي‬ ‫القطر‬
(i+j=2)
z
‫ث‬‫يف‬‫قَْو‬‫امرب‬ ‫الجيبد‬‫ّبٍح‬‫ش‬‫فٌق‬‫ىقطش‬‫ا‬ٌُّ‫ب‬‫ث‬
3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
Int max =a[0] [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++){
for ( int j=1;i<=3 ;i++){
{ax)m>a[i][j](&&)2if( i+j<
max=a[ i][ j]; }}}
;cout<<max
getch() ;}
(0,0) (0,1) (0,2)
(1,0) (1,1) (1,2)
(2,0) (2,1) (2,2)
-1‫عناصر‬ ‫شرط‬‫فوق‬‫الثانوي‬ ‫القطر‬
(i + j < 2)
‫ىقطش‬‫ا‬ ‫فٌق‬ ‫يف‬ ‫قَْو‬ ‫اصغش‬ ‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬ٌُّ‫ب‬‫ث‬
3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
n =a[0] [0] ;Int mi
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++){
for ( int j=1;i<=3 ;i++){
if( i+j<2)&&(a[I][j]<min){
min=a [i][j];}}}
cout<<min;
getch() ;
:‫ًاخت‬‫عؤاه‬
‫ا‬‫ثعذ‬ ‫قَْو‬‫اصغش‬‫ىطجبعو‬ ‫ّبٍح‬‫ش‬‫ث‬‫امزت‬ٌُّ‫ب‬‫ىث‬‫ا‬ ‫فٌق‬ ‫يف‬ ‫ىشاثع‬‫ا‬‫ىعنصش‬
‫زدَيب‬‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬‫يف‬3x3
z
‫رنشاس‬‫عذد‬5ٌُّ‫ب‬‫ىث‬‫ا‬‫ىقطش‬‫ا‬‫فٌق‬ ‫يف‬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++){
j] ; }}cin>>a[i] [
for ( int i=1;i<=3 ;i++){
for ( int j=1;i<=3 ;i++){
{)5)&&( a[i] [j] ==2<j(i+if
k++; }
}cout<<k ;}}
getch() ;}
:‫ًاخت‬‫عؤاه‬
‫يف‬ ِّ‫ب‬‫ىث‬‫ا‬‫ىعنصش‬‫ا‬ ‫ثعذ‬‫ىزنشاس‬‫ا‬‫عذد‬‫ىطجبعو‬ ‫ّبٍح‬‫ش‬‫ث‬‫امزت‬‫فٌق‬
‫زدَيب‬‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬ ‫يف‬ ٌُّ‫ب‬‫ىث‬‫ا‬3x5
‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬‫ىعنبصش‬‫ا‬‫رلٌَع‬‫حتذ‬‫ىقطش‬‫ا‬ٌُّ‫ب‬‫ث‬3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
Int sum=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++){
for ( int j=1;i<=3 ;i++){
)2>j( i+if
sum+=a[i] [j];}}
cout<<sum ;
};getch()
(0,0) (0,1) (0,2)
(1,0) (1,1) (1,2)
(2,0) (2,1) (2,2)
-1‫عناصر‬ ‫شرط‬‫تحت‬‫القطر‬
‫الثانوي‬
(i + j < 2)
2+1=3
2+2=4
1+2=3
z
‫يف‬‫قَْو‬‫امرب‬ ‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬‫حتذ‬‫ىقطش‬‫ا‬ٌُّ‫ب‬‫ث‬
3x3
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int a[3] [3] ;
max =a[0] [0] ;Int
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++){
for ( int j=1;i<=3 ;i++){
2)&&(a[i][j]> max){>if( i+j
max=a[ i][ j]; }}}
cout<<max ;
getch() ;}
:‫ًاخت‬‫عؤاه‬
‫اصغش‬‫ىطجبعو‬ ‫ّبٍح‬‫ش‬‫ث‬‫امزت‬‫ثعذ‬‫ىعنصش‬‫ا‬‫ىغبدط‬‫ا‬‫يف‬‫حتذ‬
‫زدَيب‬‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬‫يف‬ ٌُّ‫ب‬‫ىث‬‫ا‬3x3
‫ىقطش‬‫ا‬ ‫فٌق‬ ‫يف‬ ‫قَْو‬ ‫اصغش‬ ‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬ٌُّ‫ب‬‫ث‬
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)
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() ;}
‫ىزنشاس‬‫ا‬‫عذد‬‫الجيبد‬‫ّبٍح‬‫ش‬‫ث‬42ِ‫ّغ‬‫ا‬‫ىش‬‫ا‬ ‫حتذ‬ ‫يف‬‫ادلصفٌفو‬
‫ىثنبئْو‬‫ا‬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++)
{for ( int j=1;i<=3 ;i++)
if (i+j>2)&&( a[i] [j] ==42)
}}k++;
cout<<k ;
getch() ;}
:‫ًاخت‬‫عؤاه‬
‫ىعنصش‬‫ا‬ ‫ثعذ‬‫ىزنشاس‬‫ا‬‫عذد‬‫ىطجبعو‬ ‫ّبٍح‬‫ش‬‫ث‬‫امزت‬42‫يف‬‫حتذ‬
‫ادلصفٌف‬ ‫يف‬ ٌُّ‫ب‬‫ىث‬‫ا‬‫زدَيب‬‫ىثنبئْو‬‫ا‬‫و‬3x3
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]
‫ّبٍح‬‫ش‬‫ث‬‫زبصو‬‫ضشة‬‫ٍصفٌفزني‬* (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() ;}
z
‫ىْدبد‬‫ّبٍح‬‫ش‬‫ث‬‫يف‬‫ىضًخْو‬‫ا‬‫االعذاد‬‫ٍصفٌفو‬‫ثنبئْو‬ٌ‫احلد‬‫ىو‬ٌ‫رلي‬( N )
Include<iostream.h>#
include<conio.h>#
void main{
) ;Clrscr(
Int a[3] [3] ;
Cin>>n ;
;i++){for ( int i=1;i<=n
;i++){for ( int j=1;i<=n
cin>>a[i] [j] ; }}
;i++){for ( int i=1;i<=n
;i++){for ( int j=1;i<=n
if( a[i] [j] % 2==0)
cout<<a[i] [j]; }}
getch();}
3*3‫ىثنبئْو‬‫ا‬‫ادلصفٌفو‬‫االخرييف‬‫ىصف‬‫ا‬‫ٍع‬‫االًه‬‫ىصف‬‫ا‬‫ّو‬‫ذ‬‫ثزج‬ًٌ‫ّق‬‫ّبٍح‬‫ش‬‫ث‬
Include<iostream.h>#
include<conio.h>#
void main{
Clrscr() ;
Int t ;
] ;Int a[3] [3
i++){for ( int i=1;i<=3 ;
i++){;for ( int j=1;i<=3
cin>>a[i] [j] ; }}
i++){;3for ( int i=1;i<=
i++){;for ( int j=1;i<=3
];[i][0t= a
[i] =a[2] [i] ;a [0]
a[2] [i] =t ; }}
cout<<a[i][j];
getch();}
z
–













‫رَب‬‫س‬ِ‫ﯾ‬:
١,‫ا‬‫مزت‬‫ثشّبٍح‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬‫ثنبئﯿخ‬ً‫طجبعخ‬‫ا‬‫ىَزٌعط‬
‫ا‬ِ‫ىسغبث‬-
٢,‫ا‬‫مزت‬‫ّبٍح‬‫ش‬‫ث‬‫ىقش‬‫اءح‬‫عنبصش‬ِ‫ٍصفٌفزﯿ‬ِ‫ثنبئﯿزﯿ‬ً‫طجبعخ‬ٌَ‫ٍد‬‫ع‬
‫عنبصش‬‫ا‬‫ىقطش‬‫ا‬‫ىشئﯿظ‬‫ىيَصفٌفخ‬‫ا‬‫ال‬ًَ‫ى‬‫ٍع‬ٌَ‫ٍد‬‫ع‬‫ع‬‫نبصش‬‫ا‬‫ىقطش‬‫ا‬ٌّ‫ب‬‫ىث‬ُ
‫ىيَصفٌفخ‬‫ا‬‫ّﯿخ‬‫ب‬‫ىث‬-
٣,‫ا‬‫مزت‬‫ثشّبٍح‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬‫ثنبئﯿخ‬ً‫طجبعخ‬‫ا‬‫ىعنبصش‬‫أ‬َ‫عي‬
‫ا‬‫ىقطش‬‫ا‬ٌّ‫ب‬‫ىث‬ُ-
٤,‫ا‬‫مزت‬‫ثشّبٍح‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬‫ثنبئﯿخ‬ً‫طجبعخ‬‫ا‬‫ىعنبصش‬‫أ‬‫عفو‬
‫ا‬‫ىقطش‬‫ا‬ٌّ‫ب‬‫ىث‬ُ-
٥,‫ا‬‫مزت‬‫ثشّبٍح‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬‫ثنبئﯿخ‬ً‫طجبعخ‬‫أ‬‫مجش‬‫عذ‬‫د‬
ِ‫ف‬‫ا‬‫ىقطش‬‫ا‬ِ‫ىشئﯿغ‬ً‫خَعﮫ‬‫ٍع‬‫أ‬‫مجش‬‫عذ‬‫د‬ِ‫ف‬‫ا‬‫ىعنبصش‬‫ا‬َ‫عي‬‫ا‬‫ىقطش‬
‫ا‬ٌّ‫ب‬‫ىث‬ُ-
٦,‫ا‬‫مزت‬‫ثشّبٍح‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬‫ثنبئﯿخ‬
z
٧,‫ا‬‫مزت‬‫ثشّبٍح‬ٌُّ‫ب‬‫ىث‬‫ا‬‫ىفٌق‬‫ا‬‫عنبصش‬‫جبَع‬ًٌ‫ّق‬-
٨,‫ا‬‫مزت‬‫ثشّبٍح‬ِ‫ّغ‬‫أ‬‫ىش‬‫ا‬‫ىقطش‬‫ا‬‫ىعنبصش‬‫ا‬‫جبَع‬ًٌ‫ّق‬
٩,‫ا‬‫مزت‬‫ثشّبٍح‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬‫ثنبئﯿخ‬ً‫طجبعخ‬‫ا‬‫ىعنب‬‫صش‬‫راد‬
‫ا‬ٌَ‫ى‬‫ا‬‫قع‬‫ا‬ٌ‫ى‬‫ص‬‫خﯿخ‬-
١١,‫ا‬‫مزت‬‫ّبٍح‬‫ش‬‫ث‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬‫ثنبئﯿخ‬ً‫ﯾو‬ٌ‫رس‬‫مو‬‫عذ‬‫د‬
ً‫ص‬ِ‫خ‬‫ا‬َ‫ى‬‫عذ‬‫د‬‫فش‬ُ‫د‬-
١١,‫ا‬‫مزت‬‫ّبٍح‬‫ش‬‫ث‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬‫ثنبئﯿخ‬ً‫ٍجب‬‫د‬‫ىخ‬ٌ‫قﯿ‬‫ا‬ٌَ‫ى‬‫ا‬‫قع‬
‫ا‬‫ىفش‬‫د‬‫ﯾخ‬ٌ‫ثقﯿ‬‫ا‬ٌَ‫ى‬‫ا‬‫قع‬‫ا‬‫ىض‬ً‫خﯿخ‬-
١٢,‫ا‬‫مزت‬‫ثشّبٍح‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬‫ثنبئﯿخ‬ً‫طجبعخ‬‫ٍسذ‬‫د‬‫ٍصفٌف‬‫خ‬-
١٤,‫ا‬‫مزت‬‫ثشّبٍح‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬‫ثنبئﯿخ‬ً‫طجبعخ‬‫ا‬‫ال‬‫ط‬‫ا‬‫ىث‬‫ب‬‫ىث‬‫ىيَصفٌفخ‬-
١٥,‫ا‬‫مزت‬‫ّبٍح‬‫ش‬‫ث‬‫ىقش‬‫اءح‬‫عنبصش‬‫ٍصفٌفخ‬ً‫طجبعخ‬‫ٍضش‬‫ًة‬‫مو‬
‫عنصش‬‫دا‬‫خو‬‫ا‬‫ىَصفٌفخ‬-
‫االٍش‬‫ىزغيْو‬ِ‫ًالم‬‫ّو‬‫ض‬ْ‫االّني‬‫ثيغو‬‫االعئيو‬‫مجْع‬:ٌ‫ٍي‬‫ٍالزضو‬
‫ىل‬‫ا‬‫ىز‬‫مٌّذ‬‫ىزا‬‫ىعشثْو‬‫ا‬‫ثيغو‬ ‫ىنزبة‬‫ا‬

More Related Content

What's hot

What's hot (15)

Javascript i wydajność - czy to się spina?
Javascript i wydajność - czy to się spina?Javascript i wydajność - czy to się spina?
Javascript i wydajność - czy to się spina?
 
1
11
1
 
c ++ informe Nº5 ucsm
c ++ informe Nº5 ucsmc ++ informe Nº5 ucsm
c ++ informe Nº5 ucsm
 
Bai Giang 10
Bai Giang 10Bai Giang 10
Bai Giang 10
 
Programs
ProgramsPrograms
Programs
 
Programs
ProgramsPrograms
Programs
 
Dennis zapana perez
Dennis zapana perezDennis zapana perez
Dennis zapana perez
 
Ngon ngu lap trinh
Ngon ngu lap trinhNgon ngu lap trinh
Ngon ngu lap trinh
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Toan 1 bai_05_đạo hàm - bookbooming
Toan 1 bai_05_đạo hàm - bookboomingToan 1 bai_05_đạo hàm - bookbooming
Toan 1 bai_05_đạo hàm - bookbooming
 
aggregation and indexing with suitable example using MongoDB.
aggregation and indexing with suitable example using MongoDB.aggregation and indexing with suitable example using MongoDB.
aggregation and indexing with suitable example using MongoDB.
 
English And Applied Economics
English And Applied EconomicsEnglish And Applied Economics
English And Applied Economics
 
Drawing using turbo_cpp
Drawing using turbo_cppDrawing using turbo_cpp
Drawing using turbo_cpp
 
MUDA
MUDAMUDA
MUDA
 
Bt c cpp_0021
Bt c cpp_0021Bt c cpp_0021
Bt c cpp_0021
 

Viewers also liked

Presentation & arrays &
Presentation & arrays &Presentation & arrays &
Presentation & arrays &Ahmed jamal
 
برمجة الرسوم بلغة السي بلس بلس المرحلة الثالثة
     برمجة الرسوم بلغة السي بلس بلس المرحلة الثالثة     برمجة الرسوم بلغة السي بلس بلس المرحلة الثالثة
برمجة الرسوم بلغة السي بلس بلس المرحلة الثالثةميثاق المعموري
 
ميكروكنترولر بشرح م احمد سميرفايد
ميكروكنترولر بشرح م احمد سميرفايدميكروكنترولر بشرح م احمد سميرفايد
ميكروكنترولر بشرح م احمد سميرفايدMahmoud Wanis
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينوsalih mahmod
 

Viewers also liked (7)

ARRAYS
ARRAYSARRAYS
ARRAYS
 
Presentation & arrays &
Presentation & arrays &Presentation & arrays &
Presentation & arrays &
 
برمجة الرسوم بلغة السي بلس بلس المرحلة الثالثة
     برمجة الرسوم بلغة السي بلس بلس المرحلة الثالثة     برمجة الرسوم بلغة السي بلس بلس المرحلة الثالثة
برمجة الرسوم بلغة السي بلس بلس المرحلة الثالثة
 
ميكروكنترولر بشرح م احمد سميرفايد
ميكروكنترولر بشرح م احمد سميرفايدميكروكنترولر بشرح م احمد سميرفايد
ميكروكنترولر بشرح م احمد سميرفايد
 
Graphics in C++
Graphics in C++Graphics in C++
Graphics in C++
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينو
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

c++ كتاب برمجه