0% found this document useful (0 votes)
50 views64 pages

6614 PDF

This document contains code for printing patterns of stars in C++. It includes multiple code snippets showing different patterns that can be printed, such as triangles, pyramids, and other shapes, using for loops and if/else statements. The code uses functions like cout, cin, and getch() to print to the screen and take user input. Brief comments in Arabic are included to explain some of the code snippets.

Uploaded by

Armando White
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views64 pages

6614 PDF

This document contains code for printing patterns of stars in C++. It includes multiple code snippets showing different patterns that can be printed, such as triangles, pyramids, and other shapes, using for loops and if/else statements. The code uses functions like cout, cin, and getch() to print to the screen and take user input. Brief comments in Arabic are included to explain some of the code snippets.

Uploaded by

Armando White
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬

‫اﳉﻤﻬﻮرﯾﺔ اﻟﯿﻤﻨﯿﺔ‬ ‫ﻗﺴﻢ رﯾﺎﺿﯿﺎت ﺣﺎﺳﻮب‬ ‫ﻛﻠﯿﺔ اﻟﻌﻠﻮم‬ ‫ﺟﺎﻣﻌﺔ اب‬

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
‫ﳏﺎﻓﻈﺔ ﺷﺒﺎن اﻟﻌﻨﻮان ﺷﺒﺎن‬

‫ﻫﺬا اﻟﻜﺘﺎب‬
‫ﻣﻘﺪم ﻟﻜﻢ ﻣﻦ ﳏﺐ ﻣﻮﻗﻊ‬
‫ﻛﺘﺐ‬
‫ﻋﻤﺮ أﲪﺪ ﳏﻤﺪ اﻟﱰﯾﻜﻲ‬
‫اﳉﻤﻬﻮرﯾﺔ اﻟﯿﻤﻨﯿﺔ‬
‫إب ﻣﺪﯾﺮﯾﺔ ﺟﺒﻠﺔ‬/‫م‬
‫وﺷﻜﺮا‬

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
/* ******* /* *
***** ***
*** *****
*/ * *******
#include<iostream.h> */
#include<conio.h> #include<iostream.h>
int x,a,i,j; #include<conio.h>
main() int x,a,i,j;
{clrscr(); main()
cin>> x; {clrscr();
cout<<"\n"; cin>> x;
for(i=1;i<=x;i++) cout<<"\n";
{ for(i=1;i<=x;i++)
for(a=1;a<=i-1;a++) { for(a=1;a<=x-i;a++)
{cout<< " ";} {cout<< " ";}
for(j=1;j<=2*(x- for(j=1;j<=2*i-1;j++)
i+1)-1;j++) {cout<< "*";}
{cout<< "*";} cout<<"\n";}
cout<<"\n";} getch();
getch(); }
/* ******* /* a
***** b c
*** d e f
*/ * g h i j
#include<iostream.h> ‫*اﻻﺳﻜﻲ ﺷﻔﺮة ﻣﻦ ﺧﺮوج ﺑﺪون‬/
#include<conio.h>
int x,a,i,j; #include<iostream.h>
main() #include<conio.h>
{clrscr();
cin>> x; int main()
cout<<"\n"; {int x,a,i,j,b=0;
for(i=1;i<=x;i++) clrscr();
{ char
for(a=1;a<=i-1;a++) m[26]={'a','b','c','D','E','F','G','H',
{cout<< " ";} 'I','J',
for(j=1;j<=2*(x- 'K','L','M','N','O','P','Q','R','S','T'

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
i+1)-1;j++) ,'U','V','W','X','Y','Z'};
{cout<< "*";} cin>> x;
cout<<"\n";} cout<<"\n";
getch(); for(i=1;i<=x;i++)
} } { for(j=1;j<=x-i;j++)
{cout<< " ";}
for(a=1;a<=i;a++)
{cout<< m[(b++)%26]<<" ";}
cout<<"\n";}
getch();
}
/* * /* 1 1 1 0
*** 2 2 0 2
***** 3 0 3 3
*** 0 4 4 4
* */
*/ #include<iostream.h>
#include<iostream.h> #include<conio.h>
#include<conio.h> main()
int x,a,i,j,r; {
main() clrscr();
{clrscr(); int s=0,d=1,g=4;
cin>> x; for (int i=1; i<=16; i++)
cout<<"\n"; {
for(i=1;i<=x;i++) s=s+1;
{ for(a=1;a<=x-i+1;a++) if(i==g)cout<<0<<" ";
{cout<< " ";} else if(i!=g)cout<<d<<" ";
for(j=1;j<=2*i-1;j++)
{cout<< "*";} if(s==4){ s=0;
cout<<"\n";} cout<<endl;d=d+1,g=g+3;}
for(r=1;r<=(2*(x+1)-1);r++) }
cout<<"*"; getch();
cout<<"\n"; }
for(i=x;i>=1;i--)
{ for(a=1;a<=x-i+1;a++)
{cout<< " ";}

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
for(j=1;j<=2*i-1;j++)
{cout<< "*";}
cout<<"\n";}
getch();
}
/* * /* *
* * * ***
* * * * * *****
* * * * * * * ***
* * * * * *
* * * ‫*ﺑﺎﻟﻌﺪد‬/
* #include<iostream.h>
*/ #include<conio.h>
#include<stdio.h> #include<math.h>
#include<iostream.h>
#include<conio.h> void main()
main() {
{ int n;
clrscr(); cout<<"enter anumber of
for(int i=1; i<=4; i++) star";
{ cin>>n;
for(int i1=5; i1>=i; i1--) for(int i=1;i<=n;i++)
cout<<" "; {
for(int j=1; j<=2*i-1; j++) for(int j=1;j<=n-1;j++){
cout<<"*"<<" "; if(j>n-i)
cout<<endl; cout<<"*";
} else
for(i=3; i>=1; i--) cout<<" ";}
{ for(int k=1;k<=2*i-1;k++)
for(int i1=5; i1>=i; i1--) cout<<"*";
cout<<" "; cout<<"\n";
for(int j=1; j<=2*i-1; j++) }
cout<<"*"<<" "; for(int m=n;m<=n&&m!=0;m--)
cout<<endl; {
} for(int j=1;j<=n-1;j++){
getch(); if(j>n-m)

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
} cout<<"*";
else
cout<<" ";}
for(int k=1;k<=2*m-1;k++)
cout<<"*";
cout<<"\n";
}

/*0 5 10 15 //‫اﻟﺸﻜﻞ ﺑﻄﺒﺎﻋﺔ ﯾﻘﻮم ﺑﺮﻧﺎﻣﺞ‬


20 0 30 35 ‫ﻣﺪﺧﻞ رﻣﺰ اي ﻣﻊ اﳌﻘﺎﺑﻞ‬
40 45 0 55 /* *
60 65 70 0 * *
*/ * *
#include<iostream.h> * *
#include<conio.h> *
main() */
{ #include <iostream.h>
clrscr(); #include <conio.h>
int s=0,d=0; main ()
for (int i=0; i<=15; i++) {
{ clrscr();
char ch;
if(s==4) {s=0;cout<<endl;} int i,j,t,k;
if(d==5) {cout<<0<<" ";d=0;} int x,z,c,m,w,h,r,e;
else if(d!=5) cout<<i*5<<" "; cout<<"Enter SHEEB"<<endl;
s=s+1;d=d+1; cin>>ch;
} cout<<"Enter 'numbr'
getch(); "<<endl;
} cin>>w;
for(i=1;i<=w;i++)
{
for(j=1;j<=w-i;j++)
cout<<" ";
/* 1
for(e=i;e<=i;e++)

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
212 cout<<ch;
32123 for(r=1;r<=2*i-3;r++)
4321234 cout<<" ";
*/ if(i>=2)
#include<stdio.h> for(x=i;x<=i;x++)
#include<iostream.h> cout<<ch;
#include<conio.h> cout<<endl;
main() }
{ for(z=w-1;z>=1;z--)
clrscr(); {
for(int i=1; i<=4; i++){ for(m=1;m<=w-z;m++)
for(int i1=4; i1>=i; i1--) cout<<" ";
cout<<" "; for(h=z;h<=z;h++)
if(i>1) cout<<ch;
for(int j1=i; j1>=2; j1--) for(c=2*z-3;c>=1;c--)
cout<<j1; cout<<" ";
for(int j=1; j<=i; j++) for(t=z;t<=z ;t ++)
cout<<j; if(z>=2)
cout<<endl; cout<<ch;
} cout<<endl;
getch(); }
} getch();
}

/* *
** /* 1
*** 212
**** 32123
*/ 4321234
#include<iostream.h> ‫ﺑﺎﻟﻌﺪد‬
#include<conio.h> */
main() #include <iostream.h>
{ #include <conio.h>
clrscr(); main ()
int s=0,d=0; {
for (int i=1; i<=10; i++) clrscr();

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
{ int i,j,n;
cout<<"*"; cin>>n;
s=i%2;
if(s!=0&&i<4) for (i=1;i<=n;i++)
cout<<endl; {
if(s==0&&i>4&&i<8) for(j=i;j<n;j++)
cout<<endl; cout<<" ";
} for(j=i;j>=1;j--)
getch(); cout<<j;
} for(j=2;j<=i;j++)
cout<<j;
cout<<endl;
}

getch();
}
//‫ اﻟﺘﺎﻟﯿﺔ اﳌﺘﺴﻠﺴﻠﺔ ﺷﻜﻞ‬0 1 1 2 3 /* 111
5 8 13 21 34 117
#include <iostream.h> 171
#include <conio.h> 177
711
void main () 717
{ clrscr(); 771
int f1=0,i,f2=1,s; 777
cout <<f1<<" "<<f2; */
for ( i=1 ; i<=8; i++ ) #include<iostream.h>
{s=f1+f2; main()
cout <<" "<<s ; {
f1=f2; int i,k,j;
f2=s; for(i=1;i<=7;i+=6)
} for(k=1;k<=7;k+=6)
getch (); for(j=1;j<=7;j+=6)
} cout<<i<<k<<j<<endl;
}

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬

/*11‫ﺷﻜﻞ‬ kkkkkkkkkk /* ‫* ﺷﻜﻞ ﻃﺒﺎﻋﺔ‬


kkkkkkkk * *
kkkkkk * *
kkkk * *
kk *
k ‫*ﺑﺎﻟﻌﺪداﳌﺪﺧﻞ‬/
‫*اﳌﺪﺧﻞ ﺑﺎﳊﺮف‬/ #include<iostream.h>
#include<iostream.h> #include<conio.h>
#include<conio.h> int x,a,i,j,r;
int x=9,a,i,j; main()
main() {clrscr();
{clrscr(); cin>> x;
//cin>> x; cout<<"\n";
cout<<"\n\n\n"; for(i=1;i<=x;i++)
for(i=x;i>=1;i--)
{ for(a=i;a<=x;a++) { for(a=1;a<=x-
{cout<< " ";} i+1;a++)
for(j=i;j>=1;j--) {cout<< " ";}
{cout<<(char)3<<" " ;}
if(i!=1)
for(j=2;j<=i;j++) cout<<"*";
{cout<<(char)3<<" " ;}
for(j=1;j<2*i-2;j++)
cout<<"\n";} {cout<< " ";}
getch(); cout<<"*";
} cout<<"\n";}
/* 1234
1234 cout<<"*";
1234
1234 for(r=1;r<(2*(x+1)-
*/ 2);r++)
cout<<" ";
cout<<"*\n";

for(i=x;i>=1;i--)

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
#include<stdio.h> { for(a=1;a<=x-
#include<iostream.h> i+1;a++)
#include<conio.h> {cout<< " ";}
main() if(i>1)
{ cout<<"*";
clrscr();
int s=0; for(j=1;j<2*i-2;j++)
for(int i=1; i<=4; i++){ {cout<< " ";}
cout<<i<<" ";
if(i==4&&s!=3){ cout<<"*\n";
s=s+1;
cout<<endl; }
i=0;} getch();
} }/* 1234
getch(); 1234
1234
{ 1234
clrscr(); */
for(int i=1; i<=4; i++){
for(int i1=4; i1>=i; i1--)
cout<<" ";
if(i>1)
for(int j1=i; j1>=2; j1--) #include<stdio.h>
cout<<j1; #include<iostream.h>
for(int j=1; j<=i; j++) #include<conio.h>
cout<<j; main()
cout<<endl; {
} clrscr();
getch(); int s=0;
}} for(int i=1; i<=4; i++){
/* 0 2 4 6 cout<<i<<" ";
8 0 12 14 if(i==4&&s!=3){
16 18 0 22 s=s+1;
24 26 28 0 cout<<endl;
‫*ﺑﺎﻟﻌﺪد‬/ i=0;}
#include<iostream.h> }

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
#include<conio.h> getch();
main()
{ {
int i,n; clrscr();
cin>>n; for(int i=1; i<=4; i++){
for(int i1=4; i1>=i; i1--)
for(i=0;i<n*n;i++){ cout<<" ";
if(i%(n+1)==0)cout<<"0\t"; if(i>1)
else if(i%n!=0) cout<<2*i<<"\t"; for(int j1=i; j1>=2; j1--)
else cout<<"\n"<<2*i<<"\t";} cout<<j1;
getch(); for(int j=1; j<=i; j++)
} cout<<j;
cout<<endl;
}
getch();

}}

/*54321 /* 12345
54321 123
54321 1
‫*ﺑﺎﻟﻌﺪد‬/ ‫*ﺑﺎﻟﻌﺪد‬/
#include<iostream.h> #include<iostream.h>
#include<conio.h> #include<conio.h>
main() #include<math.h>
{ int x,a,i,j;
int i,n,b; main()
cin>>n; {clrscr();
for(i=n*n;i>=1;i--){b=i%n; cin>> x;
if(b==0)cout<<"\n"<<n; cout<<"\n";
else cout<<b;} for(i=1;i<=x;i++)
getch(); { for(a=1;a<=i-
} 1;a++)
{cout<< " ";}
for(j=1;j<=2*(x-

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
i)+1;j++)
{cout<<j;}
cout<<"\n";}
getch();
}
//‫اﳌﻘﺎﺑﻞ اﻟﺸﻜﻞ ﻃﺒﺎﻋﺔ‬
#include<iostream.h> //0
#include<conio.h> //1
int f(int a,int b,int r); //1
main() //2
{clrscr(); //3
int n,p; //5
cout<<0; //8
//cin>>n; //13
cout<<"\n\n"<<1; //21
//cin>>p; //34
f(0,1,8);
getch();
}
int f(int a,int b,int r)
{int m;
cout<<"\n\n";
if(r<1)
return 0;
m=a+b;
a=b,
b=m;
cout<<m;
return f(a,b,r-1);
}
//‫واﻟﻜﻠﻤﺎت اﳊﺮوف ﻋﺪد ﳛﺴﺐ ﺑﺮﻧﺎﻣﺞ‬ //‫ﻛﺎﺑﺘﻞ اﱃ ﲰﻮل ﻣﻦ ﲢﻮﯾﻞ‬
‫ﻓﻘﺮة ﰲ واﳉﻤﻞ‬ #include<iostream.h>
#include<iostream.h> main()
#include<stdio.h> {
#include<string.h> char a;
char s[256]; int m;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
int i,k,x=0,g; cout<<"input small
void main(){ latter=";
cout<<" Enter string:"; cin>>a;
gets(s); m=-32+a;
k=1;
for(i=0;i<strlen(s);i++) if(m>=65&&m<=90)
{ cout<<(char)m;
switch(s[i]){ else
cout<<"erer";
case ' ': k++; }
break;
case '.': x++;
break;
case ',':k++;
break;}}
g=i-(k+x-1);
cout<<"\nnumber ltar is\t"<<g;
cout<<"\nNumber word
is\t"<<k<<endl;
cout<<"\nnumber sentens
is\t"<<x<<endl;

//‫ﲰﻮل اﱃ ﻛﺎﺑﺘﻞ ﻣﻦ اﳊﺮف ﲢﻮﯾﻞ‬ //‫ﲰﻮل ام ﻛﺎﺑﺘﻞ اﳊﺮف ﲢﺪﯾﺪ‬


#include<iostream.h> #include<iostream.h>
main() main()
{ {
char a; int a;
int m; char n;
cout<<"input captale letter ="; cin>>n;
cin>>a; cout<<n<<endl;
m=32+a; a=n;
if(a>=65&&a<=90)
if(m>=97,m<=122) cout<<"is capital letter"
cout<<(char)m; ;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
else if(a>=97&&a<=122)
cout<<"error"; cout<<"is small letter";
} if(a<65||a>90&&a<97||a>122)
cout<<"isnot letter";
}

//‫ﺗﺸﻔﲑ ﻋﻠﻰ ﯾﻌﻤﻞ ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬ //‫ﻻ ام ﺣﺮف اﳌﺪﺧﻞ ﻫﻞ‬


‫اﻟﺸﻔﺮة ﻓﻚ واﻋﺎدة اﻟﻜﻠﻤﺔ‬ #include<iostream.h>
#include<iostream.h> main()
#include <string.h> {
#include <conio.h> int a;
main() char n;
{ cin>>n;
clrscr(); cout<<n<<endl;
char a; a=n;
cout<<"do you want incoding enter
n else entr f"; if(a>=65&&a<=90||a>=97&&a<=
cin>>a; 122)
if(a=='n') cout<<"is letter" ;
{ else
char x[100],x1[100]; cout<<"isnot letter";
int n,y[100],n1=0; }
cout<<"enter word";
cin>>x;
n=strlen(x);
for(int i=0; i<n; i++)
{
y[n1]=x[i];
n1=n1+1;
}
for(i=0; i<n1; i++){
x1[i]=(y[i]+3);
cout<<x1[i];}
}
//=========================

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
else
{
char x[100],x1[100];
int n,y[100],n1=0;
cout<<"enter word";
cin>>x;
n=strlen(x);
for(int i=0; i<n; i++)
{
y[n1]=x[i];
n1=n1+1;
}
for(i=0; i<n1; i++){
x1[i]=(y[i]-3);
cout<<x1[i];}}
}

//‫واﻟﻜﻠﻤﺎت اﳊﺮوف ﻋﺪد ﳛﺴﺐ ﺑﺮﻧﺎﻣﺞ‬ //‫ﺗﺸﻔﲑ ﻋﻠﻰ ﯾﻌﻤﻞ ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬
‫ﻓﻘﺮة ﰲ واﳉﻤﻞ‬ ‫اﻟﺸﻔﺮة ﻓﻚ واﻋﺎدة اﻟﻜﻠﻤﺔ‬
#include<iostream.h> #include<iostream.h>
#include<stdio.h> #include <string.h>
#include<string.h> #include <conio.h>
char s[256]; main()
int i,k,x=0,g; {
void main(){ clrscr();
cout<<" Enter string:"; char a;
gets(s); cout<<"do you want incoding
k=1; enter n else entr f";
for(i=0;i<strlen(s);i++) cin>>a;
{ if(a=='n')
switch(s[i]){ {
char x[100],x1[100];
case ' ': k++; int n,y[100],n1=0;
break; cout<<"enter word";
case '.': x++; cin>>x;
break; n=strlen(x);

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
case ',':k++; for(int i=0; i<n; i++)
break;}} {
g=i-(k+x-1); y[n1]=x[i];
cout<<"\nnumber ltar n1=n1+1;
is\t"<<"("<<g<<")"<<endl; }
cout<<"\nNumber word for(i=0; i<n1; i++){
is\t"<<"("<<k<<")"<<endl; x1[i]=(y[i]+3);
cout<<"\nnumber sentens cout<<x1[i];}
is\t"<<"("<<x<<")"<<endl; }
cout <<"\nnumber space,comma and //=========================
point: ("<<k <<")"; else
} {
char x[100],x1[100];
int n,y[100],n1=0;
cout<<"enter word";
cin>>x;
n=strlen(x);
for(int i=0; i<n; i++)
{

//‫اﻟﺸﻬﺮ ﰲ ﯾﻮم اول‬ y[n1]=x[i];


#include <iostream.h> n1=n1+1;
#include <conio.h> }
#include <math.h> for(i=0; i<n1; i++){
main () x1[i]=(y[i]-3);
{ cout<<x1[i];}}
clrscr(); }
int m,d=7,sh,c;
cout<< "inpout the year : ";
cin>>m; //
cout<< "\n inpout the month : "; ‫ﰲ اﻟﻮﻗﺖ ﺑﺈدﺧﺎل ﯾﻘﻮم ﺑﺮﻧﺎﻣﺞ‬
cin>>sh; ‫أﻣﺮﯾﻜﺎ ﰲ اﻟﻮﻗﺖ ﯾﻄﺒﻊ اﻟﯿﻤﻦ‬
cout<< "\n\n "; ‫ واﻟﺴﻌﻮدﯾﺔ وﺑﺮﯾﻄﺎﻧﯿﺎ وﻣﺼﺮ‬.
if(m>=2000 && m<=10000 && sh>=1
&& sh<=12) #include <iostream.h>
#include <conio.h>

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
{ if (sh==1)cout<< " the day main ()
that began the January in her : {clrscr();
"; int
else if (sh==2)cout<< " the timehours,timeminutes,i,j ;
day that began the February in cout<<" \n Note: \n the
her:"; time 24 hour system\n\n ";
else if (sh==3) cout<< " cout <<" Enter the time in
the day that began the March in hours in yemen = " ;
her : "; cin >>timehours;
else if (sh==4) cout<< " cout << endl;
the day that began the April in cout <<" Enter the time in
her : "; minutes = " ;
else if (sh==5) cout<< " the cin >> timeminutes;
day that began the May in her : i=timeminutes;
"; j=timehours;
else if (sh==6) cout<< " the cout << endl;
day that began the June in her : if(i>=0&&i<60)
"; {if( j>=0&&j<24)
else if (sh==7) cout<< " { cout <<"the time in KSA
the day that began the July in is " ;
her : "; cout<< j<<" : "<<i<<"
else if (sh==8)cout<< " clock\n";
the day that began the August in if( j>7)
her : "; {cout <<"\n the time in
else if (sh==9)cout<< " England is " ;
the day that began the September cout<< j-3<<" : "<<i<<"
in her : "; clock\n";
else if (sh==10) cout<< " cout << endl;
the day that began the October in cout <<" the time in Egypt
her : "; is " ;
else if (sh==11)cout<< " cout<< j-1<<" : "<<i<<"
the day that began the November clock\n";
in her : "; cout << endl;
else if (sh==12)cout<< " cout <<"the time in USA
the day that began the December is " ;
in her : "; cout<< j-7<<" : "<<i<<"

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
} clock\n";}
else if( j>3)
{ if(j==7)
if(m%4==0) {cout <<"the time in USA
{ is " ;
if(sh==1) cout<< 0<<" : "<<i<<"
c=d; clock\n";}
else if(sh==2) else
c=(29%7)+d; {cout <<"the time in USA
else if(sh==3) is " ;
c=(62%7)+d; cout<< j-7+24<<": "<<i<<"
else if(sh==4) clock\n";}
c=(91%7)+d; cout <<"\n the time in
else if(sh==5) England is " ;
c=(121%7)+d; cout<< j-3<<" : "<<i<<"
else if(sh==6) clock\n";
c=(152%7)+d; cout << endl;
else if(sh==7) cout <<"the time in Egypt
c=(183%7)+d; is " ;
else if(sh==8) cout<< j-1<<" : "<<i<<"
c=(213%7)+d; clock\n";
else if(sh==9) cout << endl;}
c=(244%7)+d; else if(j>1)
else if(sh==10) {if(j==3)
c=(274%7)+d; {cout <<"the time in
else if(sh==11) England is " ;
c=(305%7)+d; cout<< 0<<" : "<<i<<"
else if(sh==12) clock\n";
c=(336%7)+d;} cout << endl;}
else else
{if(sh==1) {cout <<"the time in
c=d; England is " ;
if(sh==2) cout<< j-3+24<<": "<<i<<"
c=(31%7)+d; clock\n";
else if(sh==3) cout << endl;}
c=(59%7)+d; cout <<"the time in Egypt

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
else if(sh==4) is " ;
c=(90%7)+d; cout<< j-1<<" : "<<i<<"
else if(sh==5) clock\n";
c=(120%7)+d; cout << endl;
else if(sh==6) cout <<"the time in USA
c=(151%7)+d; is " ;
else if(sh==7) cout<< j-7+24<<": "<<i<<"
c=(181%7)+d; clock\n";
else if(sh==8) cout << endl;}
c=(212%7)+d; else
else if(sh==9) {cout <<"the time in
c=(243%7)+d; England is " ;
else if(sh==10) cout<< j-3+24<<": "<<i<<"
c=(273%7)+d; clock\n";
else if(sh==11) cout << endl;
c=(304%7)+d; cout <<"the time in Egypt
else if(sh==12) is " ;
c=(334%7)+d;} cout<<(1-j)*23<<": "<<i<<"
{ clock\n";
if(c%7==0)cout<<" Frs"; cout << endl;
else if(c%7==1)cout<<" cout <<"the time in USA
Saturday" ; is " ;
else if(c%7==2)cout<<" cout<<j-7+24<<": "<<i<<"
Sunday"; clock\n";
else if (c%7==3)cout<<" cout << endl;}}
Monday"; else
else if (c%7==4)cout<<" {cout <<"errer"<< endl;
Tuesday"; cout<< "Enter 0 <= timehour
else if (c%7==5)cout<<" < 24";
Wednesday" ; cout << endl; }}
else if(c%7==6)cout<<" else
Thursday"; {cout <<"errer"<< endl;
cout<< "Enter 0 =<
timeminutes < 60";
else cout << endl; }
cout<<" there errer :- in one getch ();

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
in the inputs \n\n"; } }
getch ();
return 0; }
//‫ﯾﻄﺒﻊ واﻟﺸﻬﺮ اﻟﻌﺎم ﺗﺪﺧﻞ‬
‫اﻟﯿﻮم‬
#include <iostream.h>
#include <conio.h>
//‫اﺧﺮى دول وﻋﺸﺮ اﻟﯿﻤﻦ ﰲ اﻟﻮﻗﺖ‬ main ()
#include<iostream.h> {clrscr();
#include<conio.h> int y,d,m,c,D;
#include<math.h> cout<< "input the year :
main() ";
{ cin>>y;
long int x,h,m,y,s;
cout<<"input the time in Yemen: cout<< "\n input the month
h:M:s :"; : ";
cin>>h; cin>>m;
cin>>m>>s;
(h==0&&h<=12)? cout<<"\ninput date today
h=(h+12)%12:h=h%12; : ";
x=h*3600+m*60+s+3600; cin>>D;
h=x/3600; d=(y+(y-1)/4-(y-1)/100+(y-
y=x%3600; 1)/400)%7+(D+1);
m=y/60; cout<< "\n\n ";
s=y%60; if(y>=2000 && y<=10000 &&
cout<<"\nThe time in UEA [dubi] D>=1 && D<=31 && m>=1 &&
:"<<h<<":"<<m<<":"<<s; m<=12)
cout<<"\n in Oman {
:"<<h<<":"<<m<<":"<<s;
if(h<=2) if((y%4==0)
h=h+12;{ &&(y%100!=0)||(y%400==0))
x=h*3600+m*60-2*3600; {
h=x/3600; if(m==1)
y=x%3600; c=d;
m=y/60; else if(m==2)
cout<<"\n in Egapt c=(31%7)+d;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
:"<<h<<":"<<m<<":"<<s; else if(m==3)
cout<<"\n in syria c=(60%7)+d;
:"<<h<<":"<<m<<":"<<s; else if(m==4)
if(h<=2) c=(91%7)+d;
h=h+12;{ else if(m==5)
x=h*3600+m*60-2*3600; c=(121%7)+d;
h=x/3600; else if(m==6)
y=x%3600; c=(152%7)+d;
m=y/60; else if(m==7)
cout<<"\n in GMT c=(182%7)+d;
[london]:"<<h<<":"<<m<<":"<<s; else if(m==8)
cout<<"\n in c=(213%7)+d;
moroco:"<<h<<":"<<m<<":"<<s; else if(m==9)
if(h<=1) c=(244%7)+d;
h=h+12;{ else if(m==10)
x=h*3600+m*60+1*3600; c=(274%7)+d;
h=x/3600; else if(m==11)
y=x%3600; c=(305%7)+d;
m=y/60; else if(m==12)
cout<<"\n in Libya c=(335%7)+d;}
:"<<h<<":"<<m<<":"<<s; else
if(h<=2.5) {if(m==1)
h=h+12;{ c=d;
x=h*3600+m*60+2.5*3600; if(m==2)
h=x/3600; c=(31%7)+d;
y=x%3600; else if(m==3)
m=y/60; c=(59%7)+d;
cout<<"\n in Iran else if(m==4)
:"<<h<<":"<<m<<":"<<s; c=(90%7)+d;
if(h<=4.5) else if(m==5)
h=h+12;{ c=(120%7)+d;
x=h*3600+m*60+4.5*3600; else if(m==6)
h=x/3600; c=(151%7)+d;
y=x%3600; else if(m==7)
m=y/60; c=(181%7)+d;
cout<<"\n in China else if(m==8)

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
:"<<h<<":"<<m<<":"<<s; c=(212%7)+d;
} else if(m==9)
}} c=(243%7)+d;
}} else if(m==10)
getch(); c=(273%7)+d;
return 0; else if(m==11)
} c=(304%7)+d;
else if(m==12)
c=(334%7)+d;}

cout<<"\n"<<D<<"/"<<m<<"/"<
<y<<" is ";
switch(c%7)
{
case 0:
cout<<" Frs";
break;
case 1:
cout <<" Saturday"
;
break;
case 2:
cout <<" Sunday";
break;
case 3:
cout <<" Monday";
break;
case 4:
cout<<" Tuesday";
break;
case 5:
cout <<"
Wednesday" ;
break;
case 6:
cout <<"

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
Thursday";
break;
}}
else
cout<<" there errer :-
in one in the inputs
\n\n";
getch ();
}

//‫اﻟﺸﻬﺮ ﰲ ﯾﻮم اول‬ //‫دول وﺛﻼث اﻟﯿﻤﻦ ﰲ اﻟﻮﻗﺖ‬


#include <iostream.h> ‫اﺧﺮى‬
#include <conio.h> #include<iostream.h>
#include <math.h> main()
main () {
{ long int x,h,m,y,s;
clrscr(); cout<<"input the time in
int m,d=7,sh,c; Yemen houre:";
cout<< "inpout the year : "; cin>>h;cout<<"minute(";
cin>>m; cin>>m;cout<<"second(";cin>
cout<< "\n inpout the month : "; >s;
cin>>sh; x=h*3600+m*60+s+3600;
cout<< "\n\n "; h=x/3600;
if(m>=2000 && m<=10000 && sh>=1 y=x%3600;
&& sh<=12) m=y/60;
s=y%60;
{ if (sh==1)cout<< " the day cout<<"\nThe time in U.E.A:
that began the January in her : "<<h<<":"<<m<<":"<<s;
"; if(h<=2)
else if (sh==2)cout<< " the h=h+12;{
day that began the February in x=h*3600+m*60-2*3600;
her:"; h=x/3600;
else if (sh==3) cout<< " y=x%3600;
the day that began the March in m=y/60;
her : "; cout<<"\nin Egapt :
else if (sh==4) cout<< " "<<h<<":"<<m<<":"<<s;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
the day that began the April in cout<<"\n in syria :
her : "; "<<h<<":"<<m<<":"<<s;
else if (sh==5) cout<< " the if(h<=2)
day that began the May in her : h=h+12;{
"; x=h*3600+m*60-2*3600;
else if (sh==6) cout<< " the h=x/3600;
day that began the June in her : y=x%3600;
"; m=y/60;
else if (sh==7) cout<< " cout<<"\n in moroco :
the day that began the July in "<<h<<":"<<m<<":"<<s;
her : "; }
else if (sh==8)cout<< " }
the day that began the August in return 0;
her : "; }
else if (sh==9)cout<< "
the day that began the September //
in her : "; ‫ﰲ اﻟﻮﻗﺖ ﺑﺈدﺧﺎل ﯾﻘﻮم ﺑﺮﻧﺎﻣﺞ‬
else if (sh==10) cout<< " ‫أﻣﺮﯾﻜﺎ ﰲ اﻟﻮﻗﺖ ﯾﻄﺒﻊ اﻟﯿﻤﻦ‬
the day that began the October in ‫ واﻟﺴﻌﻮدﯾﺔ وﺑﺮﯾﻄﺎﻧﯿﺎ وﻣﺼﺮ‬.
her : ";
else if (sh==11)cout<< " #include <iostream.h>
the day that began the November #include <conio.h>
in her : "; main ()
else if (sh==12)cout<< " {clrscr();
the day that began the December int
in her : "; timehours,timeminutes,i,j ;
} cout<<" \n Note: \n the
time 24 hour system\n\n ";
cout <<" Enter the time in
if(m%4==0) hours in yemen = " ;
{ cin >>timehours;
if(sh==1) cout << endl;
c=d; cout <<" Enter the time in
else if(sh==2) minutes = " ;
c=(29%7)+d; cin >> timeminutes;
else if(sh==3) i=timeminutes;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
c=(62%7)+d; j=timehours;
else if(sh==4) cout << endl;
c=(91%7)+d; if(i>=0&&i<60)
else if(sh==5) {if( j>=0&&j<24)
c=(121%7)+d; { cout <<"the time in KSA
else if(sh==6) is " ;
c=(152%7)+d; cout<< j<<" : "<<i<<"
else if(sh==7) clock\n";
c=(183%7)+d; if( j>7)
else if(sh==8) {cout <<"\n the time in
c=(213%7)+d; England is " ;
else if(sh==9) cout<< j-3<<" : "<<i<<"
c=(244%7)+d; clock\n";
else if(sh==10) cout << endl;
c=(274%7)+d; cout <<" the time in Egypt
else if(sh==11) is " ;
c=(305%7)+d; cout<< j-1<<" : "<<i<<"
else if(sh==12) clock\n";
c=(336%7)+d;} cout << endl;
else cout <<"the time in USA
{if(sh==1) is " ;
c=d; cout<< j-7<<" : "<<i<<"
if(sh==2) clock\n";}
c=(31%7)+d; else if( j>3)
else if(sh==3) { if(j==7)
c=(59%7)+d; {cout <<"the time in USA
else if(sh==4) is " ;
c=(90%7)+d; cout<< 0<<" : "<<i<<"
else if(sh==5) clock\n";}
c=(120%7)+d; else
else if(sh==6) {cout <<"the time in USA
c=(151%7)+d; is " ;
else if(sh==7) cout<< j-7+24<<": "<<i<<"
c=(181%7)+d; clock\n";}
else if(sh==8) cout <<"\n the time in
c=(212%7)+d; England is " ;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
else if(sh==9) cout<< j-3<<" : "<<i<<"
c=(243%7)+d; clock\n";
else if(sh==10) cout << endl;
c=(273%7)+d; cout <<"the time in Egypt
else if(sh==11) is " ;
c=(304%7)+d; cout<< j-1<<" : "<<i<<"
else if(sh==12) clock\n";
c=(334%7)+d;} cout << endl;}
{ else if(j>1)
if(c%7==0)cout<<" Frs"; {if(j==3)
else if(c%7==1)cout<<" {cout <<"the time in
Saturday" ; England is " ;
else if(c%7==2)cout<<" cout<< 0<<" : "<<i<<"
Sunday"; clock\n";
else if (c%7==3)cout<<" cout << endl;}
Monday"; else
else if (c%7==4)cout<<" {cout <<"the time in
Tuesday"; England is " ;
else if (c%7==5)cout<<" cout<< j-3+24<<": "<<i<<"
Wednesday" ; clock\n";
else if(c%7==6)cout<<" cout << endl;}
Thursday"; cout <<"the time in Egypt
is " ;
cout<< j-1<<" : "<<i<<"
else clock\n";
cout<<" there errer :- in one cout << endl;
in the inputs \n\n"; } cout <<"the time in USA
getch (); is " ;
return 0; cout<< j-7+24<<": "<<i<<"
} clock\n";
cout << endl;}
else
{cout <<"the time in
England is " ;
cout<< j-3+24<<": "<<i<<"
clock\n";

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
cout << endl;
cout <<"the time in Egypt
is " ;
cout<<(1-j)*23<<": "<<i<<"
clock\n";
cout << endl;
cout <<"the time in USA
is " ;
cout<<j-7+24<<": "<<i<<"
clock\n";
cout << endl;}}
else
{cout <<"errer"<< endl;
cout<< "Enter 0 <= timehour
< 24";
cout << endl; }}
else
{cout <<"errer"<< endl;
cout<< "Enter 0 =<
timeminutes < 60";
cout << endl; }
getch ();
}

//‫اﺧﺮى دول وﺛﻼث اﻟﯿﻤﻦ ﰲ اﻟﻮﻗﺖ‬ //‫ﯾﻄﺒﻊ واﻟﺸﻬﺮ اﻟﻌﺎم ﺗﺪﺧﻞ‬


#include<iostream.h> ‫اﻟﯿﻮم‬
main() #include <iostream.h>
{ #include <conio.h>
long int x,h,m,y,s; main ()
cout<<"input the time in Yemen {clrscr();
houre:"; int y,d,m,c,D;
cin>>h;cout<<"minute("; cout<< "input the year :
cin>>m;cout<<"second(";cin>>s; ";
x=h*3600+m*60+s+3600; cin>>y;
h=x/3600;
y=x%3600; cout<< "\n input the month

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
m=y/60; : ";
s=y%60; cin>>m;
cout<<"\nThe time in U.E.A:
"<<h<<":"<<m<<":"<<s; cout<<"\ninput date today
if(h<=2) : ";
h=h+12;{ cin>>D;
x=h*3600+m*60-2*3600; d=(y+(y-1)/4-(y-1)/100+(y-
h=x/3600; 1)/400)%7+(D+1);
y=x%3600; cout<< "\n\n ";
m=y/60; if(y>=2000 && y<=10000 &&
cout<<"\nin Egapt : D>=1 && D<=31 && m>=1 &&
"<<h<<":"<<m<<":"<<s; m<=12)
cout<<"\n in syria : {
"<<h<<":"<<m<<":"<<s;
if(h<=2) if((y%4==0)
h=h+12;{ &&(y%100!=0)||(y%400==0))
x=h*3600+m*60-2*3600; {
h=x/3600; if(m==1)
y=x%3600; c=d;
m=y/60; else if(m==2)
cout<<"\n in moroco : c=(31%7)+d;
"<<h<<":"<<m<<":"<<s; else if(m==3)
} c=(60%7)+d;
} else if(m==4)
return 0; c=(91%7)+d;
} else if(m==5)
c=(121%7)+d;
else if(m==6)
//‫اﻟﺴﺮ ﻛﻠﻤﺔ‬ c=(152%7)+d;
#include<iostream.h> else if(m==7)
#include<conio.h> c=(182%7)+d;
#include<math.h> else if(m==8)
c=(213%7)+d;
void main() else if(m==9)
{ c=(244%7)+d;
cout<<"enter your password" ; else if(m==10)

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
long int n,m ; c=(274%7)+d;
cin>>n; else if(m==11)
cout<<"enter password "; c=(305%7)+d;
cin>>m; else if(m==12)
if(m==n) c=(335%7)+d;}
cout<<"good"; else
else {if(m==1)
for(int i=1;i<=2;i++) c=d;
{ if(m==2)
cout<<"password error enter c=(31%7)+d;
password"; else if(m==3)
cin>>m; c=(59%7)+d;
if(m==n){ else if(m==4)
cout<<"good"; c=(90%7)+d;
break; else if(m==5)
} c=(120%7)+d;
if(i==2) else if(m==6)
cout<<"error!!!!"; c=(151%7)+d;
}} else if(m==7)
c=(181%7)+d;
//‫ﻓﻘﻂ ﻣﺮات ﺛﻼث اﻟﺴﺮ ﻛﻠﻤﺔ‬ else if(m==8)
#include <iostream.h> c=(212%7)+d;
main() else if(m==9)
{ c=(243%7)+d;
int i=1,x=1234,z; else if(m==10)
cout<<"input pass"; c=(273%7)+d;
do else if(m==11)
{ c=(304%7)+d;
cin>>z; else if(m==12)
if(z==x){ c=(334%7)+d;}
cout<<"OK";
break; } cout<<"\n"<<D<<"/"<<m<<"/"<
else { <y<<" is ";
cout<<"agen input"; switch(c%7)
i++; } {
} case 0:

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
while(z!=x&&i<=3); cout<<" Frs";
return 0; break;
} case 1:
cout <<" Saturday"
;
break;
case 2:
cout <<" Sunday";
break;
case 3:
cout <<" Monday";
break;
case 4:
cout<<" Tuesday";
break;
case 5:
cout <<"
Wednesday" ;
break;
case 6:
cout <<"
Thursday";
break;
}}
else
cout<<" there errer :-
in one in the inputs
\n\n";
getch ();
}
//‫ﻃﺎﻟﺐ ﻣﻌﺪل‬ // ‫ﻛﻞ ﺗﻘﺪﯾﺮ ﻣﻊ ﻃﺎﻟﺐ ﻣﻌﺪل‬
#include<iostream.h> ‫ﻣﺎدة‬
#include<conio.h> #include<iostream.h>
#include<math.h> main()
int d=0,z=0,c=0,m=0,w=0; { int
int avg(int n) A=0,b=0,c=0,e=0,f=0;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
{ float x,n,s=0,a;
switch(n) char y[10],z[20];
{ cout<<"input name's tha
case 10: d++; student :";
break; cin.get(y,12);
case 9: d++; cout<<"\ninput number's the
break; subject :";
case 8: z++; cin>>x;
break; for(int i=1;i<=x;i++) {
case 7: c++; cout<<"\ninput name's the
break; subject("<<i<<") ";
case 6: m++; cin>>z;
break; {
}} cout<<"\ninput deagred the
void main() "<<z<<" = ";
{ cin>>n;
char x[20];
int a,b,f=0,t=0; (n>=90)?++A:(n>=80)?++b:(n>
cout<<"enter anume of student\t"; =65)?++c:(n>=50)?++e:++f;
cin>>x;
cout<<x<<"\n";
cout<<"enter anumber of your s=s+n;
sapJt\n"; }}
cin>>a; cout<<" \nsumetion the
for(int i=0;i<a;i++) subject "<<y<<" = "<<s;
{ a=s/x;
if(i==0)
cout<<"enter avg of asabjt one "; cout<<"\nthe avreg "<< y<<"
else = "<<a<<" %";
cout<<"enter avg of asabjt next
"; (a>=90)?cout<<"\tExelant":(
cin>>c; a>=80)?
b=c/10; cout<<"\tVerygood":(a>=65)?
avg(b); cout<<"\tGood":(a>=50)?
f=f+c; cout<<"\tPassed":cout<<"\tF
t++; ailed";

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
} cout<<"\nnumber the subject
cout<<"sum is"<<f<<"\n"<<"‫اﳌﻌﺪل‬ Exlant ="<<A <<"\nnumber
‫<<"ﻫﺆ‬f/t<<"\n"<<"anumber of sabjt the subject very good="<<b;
\n"<<"\nA= "<<d<<"\nB= cout<<"\nnumber the subject
"<<z<<"\nC= "<<c<<"\nM= good="<<c<<"\nnumber the
"<<m<<"\n"; subject passed
cout<<"d= "<<t-(d+z+c+m); ="<<e<<"\nnumber the
} subbject failed="<<f;
return 0;
}
#include<iostream.h>
#include<conio.h>
#include<math.h>
main()
{
int m;
cin>>m;
(m>=90&&m<=100)?cout<<"exla
nt":(m>=80)?cout<<"very
good":
(m>=65)?cout<<"good":(m>=48
)?cout<<"A":cout<<"F";
getch();
return 0;
}

//‫وﻋﺪد ﻣﺎدة ﻛﻞ وﺗﻘﺪﯾﺮ اﻟﻄﺎﻟﺐ ﻣﻌﺪل‬ //‫ﺟﯿﺪ ﳑﺘﺎز ﻃﺎﻟﺐ ﻣﻌﺪل ﺗﻘﺪﯾﺮ‬
‫ﺗﻘﺪﯾﺮ ﻛﻞ ﰲ اﳌﻮاد‬ ‫ﺿﻌﯿﻒ ﻣﻘﺒﻮل ﺟﯿﺪً ﺟﺪا‬
#include<iostream.h> #include<iostream.h>
main() main()
{ int A=0,b=0,c=0,e=0,f=0; {
float x,n,s=0,a; char name[20];
char y[10],z[10]; int avg,a;
cout<<"input name's tha student cout<<"input studnt name";
:"; cin>>name;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
cin.get(y,12); cout<<"input studnt avg";
cout<<"\ninput number's the cin>>avg;
subject :"; a=avg/10;
cin>>x; cout<<name<<"\t"<<avg<<endl
for(int i=1;i<=x;i++) { ;
cout<<"\ninput name's the
subject("<<i<<") ";
cin.get(z,12); (a==10||a==9)?cout<<"EXCELL
ENT
cout<<"\ninput deagred the !!!":(a==8)?cout<<"VGOOD":(
"<<z<<" = "; a==7)?cout<<"GOOD":(a==6)?c
cin>>n; out<<"NOT
BAD":(a==5)?cout<<"LOST":co
(n>=90)?++A:(n>=80)?++b:(n>=65)?+ ut<<"f";
+c:(n>=50)?++e:++f;
}

s=s+n; //‫ﻣﻌﺪل‬
} #include<iostream.h>
cout<<" \nsumetion the subject #include<conio.h>
"<<y<<" = "<<s; #include<math.h>
a=s/x; int d=0,z=0,c=0,m=0,w=0;
int avg(int n)
cout<<"\nthe avreg "<< y<<" = {
"<<a<<" %"; switch(n)
{
(a>=90)?cout<<"\tExelant":(a>=80) case 10: d++;
? break;
cout<<"\tVerygood":(a>=65)?cout<< case 9: d++;
"\tGood":(a>=50)? break;
cout<<"\tPassed":cout<<"\tFailed" case 8: z++;
; break;
cout<<"\nnumber the subject case 7: c++;
Exlant ="<<A <<"\nnumber the break;
subject very good="<<b; case 6: m++;
cout<<"\nnumber the subject break;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
good="<<c<<"\nnumber the subject }}
passed ="<<e<<"\nnumber the void main()
subbject failed="<<f; {
return 0; char x[20];
} int a,b,f=0,t=0;
cout<<"enter anume of
student\t";
cin>>x;
cout<<x<<"\n";
cout<<"enter anumber of
your sapJt\n";
cin>>a;
for(int i=0;i<a;i++)
{
if(i==0)
cout<<"enter avg of asabjt
one ";
else
cout<<"enter avg of asabjt
next ";
cin>>c;
b=c/10;
avg(b);
f=f+c;
t++;
}
cout<<"sum
is"<<f<<"\n"<<"‫اﳌﻌﺪل‬
‫<<"ﻫﻮ‬f/t<<"\n"<<"anumber of
sabjt \n"<<"\nA=
"<<d<<"\nB= "<<z<<"\nC=
"<<c<<"\nM= "<<m<<"\n";
cout<<"d= "<<t-(d+z+c+m);
}

//‫ ﻣﻦ اﻻﳒﻠﯿﺰﯾﺔ ﺑﺎﻟﻠﻐﺔ اﻻرﻗﺎم‬1-999 //‫ﺑﲔ ﻣﻦ اﻻﻛﱪ اﻟﻌﻨﺼﺮ ﯾﻄﺒﻊ‬

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
#include<iostream.h> ‫ﺛﻼﺛﺔ‬
main() #include<stdio.h>
{ #include<conio.h>
int x,y,z,f,s; #include<iostream.h>
cout<<"Enter the Number :"; void main()
cin>>s; {
x=s/100; int n1,n2,n3,max;
f=s/10; cout<<"n=";
y=f%10; cin>>n1;
z=s%10; cout<<"\n n2=";
cin>>n2;
cout<<x<<"\t"<<y<<"\t"<<z<<endl; cout<<"\n n3=";
switch (x) cin>>n3;
{ if((n1>n2)&&(n1>n3))
case 9:cout<<"Nain handred"; max=n1;
break ; else if (n2>n3)
case 8:cout<<"Eit handred"; max=n2;
break ; else
case 7:cout<<"Seven handred"; max=n3;
break ;
case 6:cout<<"Six handred"; cout<<"\n max="<<max;
break ; getch();
case 5:cout<<"Five handred"; }
break ;
case 4:cout<<"Fure handred";
break ; //y=(n*(n+1))/2
case 3:cout<<"Three handred"; #include<iostream.h>
break ; #include<conio.h>
case 2:cout<<"Two handred"; #include<math.h>
break ; void main()
case 1:cout<<"one handred"; {
break ;
default : cout<<" "; break ; int n,y;
} cout<<"enter anumber";
switch (y) cin>>n;
{ y=(n*(n+1))/2;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
case 9:cout<<" Nainten"; cout<<"sum is\t"<<y;
break ; }
case 8:cout<<" Eitten";
break ;
case 7:cout<<" Seventen";
break ;
case 6:cout<<" Sixten";
break ;
case 5:cout<<" Fiveten"; //‫ﻣﻌﺎدﻟﺔ‬
break ; y=(x*pow(10,n)+0.5)/pow(10,
case 4:cout<<" Fureten"; n)
break ; #include<iostream.h>
case 3:cout<<" Threeten"; #include<conio.h>
break ; #include<math.h>
case 2:cout<<" Twoten"; main()
break ; {
case 1:cout<<" oneten"; int y,n;
break ; float x;
default :cout<<" "; break; cout<<"enter number" ;
} cin>>x;
switch (z) cout<<"enter number";
{ cin>>n;
case 9:cout<<" Nain "; y
break ; =(x*pow(10,n)+0.5)/pow(10,n
case 8:cout<<" Eit "; );
break ; cout<<y;
case 7:cout<<" Seven "; }
break ;
case 6:cout<<" Six "; //22 ‫ﻋﻠﻰ ﯾﻌﻤﻞ ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬
break ; ‫ان اﱃ اﻟﻌﺪد ﻣﻀﺎﻋﻔﺎت ﻃﺒﺎﻋﺔ‬
case 5:cout<<" Five "; ‫ اﻟﻌﺪد اﱃ ﯾﺼﻞ‬100 .
break ; #include<iostream.h>
case 4:cout<<" Fure "; #include<conio.h>
break ; #include<math.h>
case 3:cout<<" Three ";
break ; void main()

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
case 2:cout<<" Two "; {
break ; int n,x=1;
case 1:cout<<" one "; cout<<"enter anumber";
break ; cin>>n;
default :cout<<" "; break ; for(int i=1;x<100;i++)
} {
return 0; x=n*i;
} cout<<x<<"\t";
}}

//‫ﺳﺎﺑﻘﲔ ﻋﺪدﯾﻦ وﯾﻄﺒﻊ ﻋﺪد ﯾﺪﺧﻞ‬ //‫اﻟﺴﺎﻟﺒﺔ اﻻﻋﺪاد ﳎﻤﻮع‬


‫اﺧﺮى ﺑﻄﺮﯾﻘﺔ ﻻﺣﻘﲔ وﻋﺪدﯾﻦ‬ ‫واﳌﻮﺟﺒﺔ‬
#include<iostream.h> #include<iostream.h>
main() #include<conio.h>
{ #include<math.h>
int n,b,c,d;
char a; void main()
cout<<"input a="; {
cin>>a; int n=0,x=0,y=0;
n=a+1; cout<<"do you finsh enter
b=a+2; one\n";
c=a-1;
d=a-2; for(int i=0;n!=1;i++)
cout<<(char)a<<" "<<(char)n<<" {
"<<(char)b<<" , "<<(char)c<<" cout<<"enter anumber";
"<<(char)d<<" "; cin>>n;
} if(n%2==0)
x=x+n;
else
y=y+n;
}
cout<<"sum of even
is\t"<<x<<"\n"<<"sum of odd
is\t"<<y-1;
}

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
// y=(2*n-n(2*n+1))‫ﳛﺴﺐ ﺑﺮﻧﺎﻣﺞ‬ //‫ﻋﺪدﯾﻦ وﯾﻄﺒﻊ ﻋﺪد ﯾﺪﺧﻞ‬
‫اﻟﺘﺎﻟﯿﺔ اﳌﻌﺎدﻟﺔ‬ ‫ﻻﺣﻘﲔ وﻋﺪدﯾﻦ ﺳﺎﺑﻘﲔ‬
#include<iostream.h> #include<iostream.h>
main() main()
{ {
int n,y; int a;
cin>>n; cout<<"input a=";
y=(2*n-(2*n+1)); cin>>a;
cout<<y; cout<<a+1<<a+2<<a-2<<a-1;
} }

//‫واﻟﺴﺎﻟﺒﺔ اﳌﻮﺟﺒﺔ ﲨﻊ‬ //‫واﻻﻋﺪاد اﻟﺴﺎﻟﺒﺔ اﻻﻋﺪاد ﲨﻊ‬


#include<iostream.h> ‫اﳌﻮﺟﺒﺔ‬
#include<conio.h> #include<iostream.h>
#include<math.h> #include<conio.h>
#include<math.h>
void main()
{ void main()
int n=0,x=0,y=0; {
cout<<"can you finsh enter int n=0,x=0,y=0;
one\n"; cout<<"can you finsh enter
one\n";
for(int i=0;n!=1;i++)
{ for(int i=0;n!=1;i++)
cout<<"enter anumber"; {
cin>>n; cout<<"enter anumber";
if(n%2==0) cin>>n;
x++; if(n%2==0)
else x=x+n;
y++; else
} y=y+n;
cout<<"sum of odd }
is\t"<<x<<"\n"<<"sum of even cout<<"sum of odd
is\t"<<y-1; is\t"<<x<<"\n"<<"sum of
} even is\t"<<y-1;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
}

//‫اﻟﻀﺮب ﺟﺪول‬ //‫ﰲ اﻟﺴﺎﻟﺒﺔ اﻻﻋﺪاد ﲨﻊ‬


#include <iostream.h> ‫ﻣﺼﻔﻮﻓﺔ‬
main() #include<iostream.h>
{ #include<conio.h>
int x,y,z; #include<math.h>
for(x=1;x<13;x++)
{ void main()
for(y=1;y<13;y++) {
{ int n=0,x=0;
z=x*y; cout<<"can you finsh enter
cout<<x<<"*"<<y<<"="<<z<<endl; one\n";
}
} for(int i=0;n!=1;i++)
return 0; {
} cout<<"enter anumber";
cin>>n;
if(n<0)
x=x+n;

}
cout<<"sum is\t"<<x<<"\n";
}

//‫اﳌﺪﺧﻞ اﻟﻌﺪد ﻣﻀﺎﻋﻔﺎت‬ //‫ ﻣﺜﺎل ﲢﻮﯾﻞ‬8799 ‫ اﱃ‬9978


#include<iostream.h> #include<iostream.h>
#include<conio.h> main()
#include<math.h> {
int a,b,c,t;
void main() cin>>a>>b>>c;
{ t=a;
int n,x=1; if(a>b){
cout<<"enter anumber"; t=a;
cin>>n; a=b;
for(int i=1;x<100;i++) b=t; }

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
{ if(a>c) {
x=n*i; t=a;
cout<<x<<"\t"; a=c;
}} c=t; }
if(b>c) {
t=b;
b=c;
c=t; }
cout<<a<<b<<c;
cout<<endl<<c<<b<<a;
return 0;
}
//‫ اﻻﺻﻐﺮ اﳌﺸﱰك اﻟﻘﺎﺳﻢ ﺑﺮﻧﺎﻣﺞ‬gcd // ‫اﳌﺸﱰك اﻟﻘﺎﺳﻢ ﯾﻌﻄﻲ ﺑﺮﻧﺎﻣﺞ‬
#include <iostream.h> ‫ اﻻﻋﻈﻢ‬lcm
#include <conio.h> #include <iostream.h>
main() #include <conio.h>
{ main()
int x,y,m; {
cout<<"enter x,y\t"; int x,y,m;
cin>>x>>y; cout<<"enter x,y";
if(x<y) cin>>x>>y;
m=x; if(x<y)
else m=x;
m=y; else
while(!((x%m==0)&&(y%m==0))) m=y;
m--;
cout<<"gcd\t==="<<m; while(!((m%x==0)&&(m%y==0))
getch(); )
} m++;
cout<<"lcm is\t"<<m;
getch();
}

//‫اﻋﺪاد ﺛﻼﺛﺔ ﺑﲔ اﻟﻌﺪداﻻﺻﻐﺮﻣﻦ‬ //‫اﻻﺻﻐﺮ اﳌﺸﱰك اﻟﻘﺎﺳﻢ‬


#include <iostream.h> #include<iostream.h>

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
main() #include<conio.h>
{ main()
int a,b,c,d; { clrscr();
cin>>a>>b>>c; int x,y,r,a,b;
d=a; cout<<"Input x :";
if (d>b) cin>>x;
d=b; cout<<"\nInput y :";
else if(d>c) cin>>y;
d=c; a=x;
cout<<d; b=y;
return 0; while(b!=0)
} {
r=a%b;
a=b;
b=r;
}
cout<<"\n The
GCD("<<x<<","<<y<<")= "<<a;
getch();
}

//‫ﻣﺪﺧﻞ ﻋﺪد اي ﻻﻗﺮب اﻟﺘﻘﺮﯾﺐ‬ //‫اﻟﻔﺮدﯾﺔ اﻻﻋﺪاد ﻃﺒﺎﻋﺔ‬


#include <iostream.h> ‫واﻟﺰوﺟﯿﺔ‬
#include <conio.h> #include<iostream.h>
#include <math.h> #include<conio.h>
main () main()
{ {clrscr();
clrscr(); int
int n; x,e=0,even[10],odd[10],w=0,
float x, y; z,a,s,i,f[10];
cout<<" input the Number : x= "; cin>> x;
cin>>x; cout<<"\n";
cout<<" input the most dicimal for(i=0;i<x;i++)
Numper : n="; {cin>>f[i];cout<<"\n";}

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
cin>>n; for(a=0;a<x;a++)
y= ((x*pow(10,n))+0.5)/pow(10,n); if(f[a]%2==0)
cout<<"y= "<<y; {even[w]=f[a];w+=1;}
getch (); else
return 0; {odd[e]=f[a];e+=1;}
} x-=w;cout<<"even : ";
for(z=0;z<w;z++)
cout<<even[z]<<" ";
cout<<"\n\n odd : ";

for(z=0;z<e;z++)
cout<<odd[z]<<" ";
getch(); }
//‫اﱃ اﻟﻮاﺣﺪ ﻣﻦ اﻻوﻟﯿﺔ اﻻﻋﺪاد ﯾﺴﺮد‬ //‫ﻫﺠﺎء اﻻﻋﺪاد ﻃﺒﺎﻋﺔ‬
‫اﺧﺘﯿﺎرة ﯾﺘﻢ ﻋﺪد‬ #include<iostream.h>
#include <iostream.h> #include<conio.h>
#include <conio.h> #include<math.h>
int num(int z)
void main () {
{ clrscr(); switch(z){
int y,x,i,j; case 1: cout<<" ‫;"واﺣﺪ‬
cout <<"enter the numbere=" ; break;
cin >> x; case 2: cout<<"‫;"اﺛﻨﲔ‬
cout <<" the numbere is prima break;
" ; case 3: cout<<"‫;"ﺛﻼﺛﺔ‬
cout << endl; break;
for ( i=2 ; i<=(x); i++ ) case 4: cout<<"‫;"ارﺑﻌﺔ‬
{ y=0; break;
for ( j=2 ; j<=(i-1); j++ ) case 5: cout<<"‫;"ﲬﺴﻪ‬
{ break;
if(i%j==0) case 6: cout<<" ‫;"ﺳﺘﺔ‬
y=1;} break;
case 7: cout<<"‫;"ﺳﺒﻐﺔ‬
if (y==0) break;
cout << i << endl; case 8: cout<<"‫;"ﲦﺎﻧﯿﺔ‬
} break;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
getch (); case 9: cout<<"‫;"ﺗﺴﻌﺔ‬
} break;
case 11: cout<<"‫;" ﻋﺸﺮة‬
break;
case 12: cout<<"‫ﻋﺸﺮة اﺣﺪى‬
";
//‫ﺛﻼﺛﺔ ﺑﲔ ﻋﺪدﻣﻦ اﻛﱪ‬
break;
#include<stdio.h>
}
#include<conio.h>
}
#include<iostream.h>
void main()
main()
{
{
long int x;
int x1,y2,z3,large;
int y,z,m;
cout<<"\n please enter no1=";
cout<<"enter number \n";
cin>>x1;
cin>>x;
cout<<"\n please enter no2=";
if(x==11)
cin>>y2;
cout<<"‫;"ﻋﺸﺮة اﺣﺪى‬
cout<<"\n please enter no3=";
else
cin>>z3;
{
if (x1>y2 && x1>z3)
if(x==12)
large=x1;
cout<<"‫;"ﻋﺸﺮة اﺛﲎ‬
else if (y2>z3)
else
large=y2;
{
else
y=x/100;
large=z3; /*x1>y2 && x1>z3 &&
z=(x%100)/10;
y2>z3? large =x1:large=z3;*/
m=(x%100)%10;
cout<<"\n the large="<<large;
getch();
num(y);
return 0;
if(x>=100)
}
cout<<" ‫;" و ﻣﺎﺋﺔ‬
num(z);
if((x%100)>=13&&
(x%100)<20)
cout<<"ten ";
else
if(x>10)

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
cout<<"‫;" ون‬
num(m);
}
} }

//‫ﰲ ﯾﻘﺎﺑﻠﺔ ﲟﺎ ﲟﺠﻤﻮﻋﺔ رﻗﻢ ﻛﻞ ﲨﻊ‬ //‫ ﻛﻠﻤﺔ ﯾﻄﺒﻊ‬yes‫ﻧﺎﺗﺞ ﻛﺎن اذا‬
‫ﻤﻮﻋﺔ‬‫اﻻول ﻣﻊ اﻻول اﻟﺜﺎﻧﯿﺔ ا‬ ‫ﻛﻠﻤﺔ ﻓﯿﻄﺒﻊ واﻻ اﻟﻌﺪدزوﺟﻲ ﲨﻊ‬
‫اﱁ اﻟﺜﺎﻧﻲ ﻣﻊ واﻟﺜﺎﻧﻲ‬ no
#include<iostream.h> #include<iostream.h>
#include<conio.h> main()
int {
x,a,i,j,v,m1[10],m2[10],sum[10]; int n,y,z;
main() cin>>n>>y;
{clrscr(); z=n+y;
if(z%2==0)
cin>> x; cout<<"yes";
cout<<"\n"; else
for(i=0;i<x;i++) cout<<"no";
cin>>m1[i];
cout<<"\n\n"; }
for(a=0;a<x;a++)
cin>>m2[a];

cout<<"\n\n";

for(j=0;j<x;j++)
sum[j]=m1[j]+m2[j];

cout<<"sum =";

for(v=0;v<x;v++)
cout<<sum[v]<<" ";
getch();
}
//‫ﻫﺠﺎء اﻻﺻﻐﺮ اﻟﻌﺪد ﯾﻄﺒﻊ‬ //‫اﻻس داﻟﺔ‬
#include<iostream.h> #include<iostream.h>

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
#include<conio.h> main()
#include<math.h> {
long int x,y;
int s,x,y,z,f,k,a,b; double a,z;
int thaozan (), handred() ,ten(), cout<<"input x :";
odded(); cin>>x;
cout<<"\ninput power y :";
main() cin>>y;
{ if(y>0) {
cout<<"Enter foure [ 4 ] Number z=x;
:";
cin>>s; for(int i=y-1;i>=1;i--)
k=s%100;
thaozan (); z=x*z; }
handred(); else if(y==0){
if (k>=10 && k<=19){
switch (k) z=1;
{ }
case 19:cout<<" Nainten"; else {
break ;
case 18:cout<<" Eitten"; a=x;
break ;
case 17:cout<<" Seventen"; for(int i=y+1;i<=-1;i++)
break ;
case 16:cout<<" Sixten"; a=x*a;
break ; z=1/a;
case 15:cout<<" Fiveten"; }
break ;
case 14:cout<<" Fureten"; cout<<z;
break ; return 0;
case 13:cout<<" Threeten"; }
break ;
case 12:cout<<" Twoelve";
break ; //‫اﳌﺪﺧﻞ اﻟﻌﺪد ﻋﻮاﻣﻞ ﯾﻄﺒﻊ‬
case 11:cout<<" eleven"; #include<iostream.h>
break ; main()

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
default : cout<<" "; ; {int number;
break; cout<<"Input the number :";
} cin>>number;
} for(int i=number;i>=1;i--)
else {
ten(); if(number%i==0)
odded(); } cout<<i<<"\t";
return 0;
} return 0;
thaozan () }
{
int a; //‫ﻻ ام اوﱄ اﻟﻌﺪد ﻫﻞ ﳜﺘﱪ‬
a=s/1000; #include<iostream.h>
switch (a) main()
{ {
case 9:cout<<"Nain thozan int N,k=0,i;
and"; break ; cin>>N;
case 8:cout<<"Eight thozan for (i=1;i<=N;i++)
and"; break ; if(N%i==0)
case 7:cout<<"Seven thozan k++;
and"; break ; if(k==2)
case 6:cout<<"Six thozan cout<<N<<" IS prime ";
and"; break ; else
case 5:cout<<"Five thozan cout<<N<<" IS not prime ";
and"; break ; return 0;
case 4:cout<<"Foure thozan }
and"; break ;
case 3:cout<<"Three thozan
and"; break ;
case 2:cout<<"Two thozan //‫ﻣﺪﺧﻠﺔ ﺑﻘﯿﻢ داﺧﻞ اﳌﺼﻔﻮﻓﺔ‬
and"; break ; ‫ﯾﻘﻮم ﺑﺎﺳﺘﺒﺪال ﻗﯿﻤﺔ ﻣﻌﯿﻨﺔ‬
case 1:cout<<"one thozan ‫اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ‬
and"; break ;
default : cout<<" "; break ;
} #include<stdio.h>
return 0;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
} #include<iostream.h>
handred ()
{ #include<conio.h>
int x,b; main()
b=s/100; {
x=b%10; clrscr();
switch (x) int
{ a[20],x,x1,n,i,k=0;
case 9:cout<<" Nain handred cout<<"enter
and"; break ; long matrex";
case 8:cout<<" Eight handred cin>>n;
and"; break ; for(i=1;
case 7:cout<<" Seven handred i<=n;i++)
and"; break ; {
case 6:cout<<" Six handred cout<<"enter
and"; break ; a["<<i<<"]";
case 5:cout<<" Five handred cin>>a[i];
and"; break ; }
case 4:cout<<" Foure handred for(i=1;
and"; break ; i<=n;i++)
case 3:cout<<" Three handred cout<<a[i]<<"
and"; break ; ";
case 2:cout<<" Two handred cout<<endl;
and"; break ; cout<<"enter
case 1:cout<<" one handred x";
and"; break ; cin>>x;
default : cout<<" "; break ; cout<<"enter
} elemet in the matrex";
return 0; cin>>x1;
}
ten() for(i=1;
{ i<=n;i++)
f=s/10; if(x1==a[i]){
y=f%10; a[i]=x;
switch (y) k=k+1;
{ }

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
case 9:cout<<" Nainty"; if(k==0)
break ; cout<<"not
case 8:cout<<" Eightty"; found"<<endl;
break ; for(i=1;
case 7:cout<<" Seventy"; i<=n;i++)
break ; cout<<a[i]<<"
case 6:cout<<" Sixty"; break ";
; getch();
case 5:cout<<" Fivety"; }
break ;
case 4:cout<<" Fourety";
break ;
case 3:cout<<" Threety";
break ;
case 2:cout<<" Twonty";
break ;
case 1:cout<<" ten"; break ;
default :cout<<" "; break;
}
return 0;
}
odded()
{
z=s%10;
switch (z)
{
case 9:cout<<" Nain ";
break ;
case 8:cout<<" Eight ";
break ;
case 7:cout<<" Seven ";
break ;
case 6:cout<<" Six ";
break ;
case 5:cout<<" Five ";
break ;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
case 4:cout<<" Foure ";
break ;
case 3:cout<<" Three ";
break ;
case 2:cout<<" Two ";
break ;
case 1:cout<<" one ";
break ;
default :cout<<" "; break ;
}
return 0;
}
//‫ﻋﺪد ﻻﳚﺎد ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬
‫ﻣﺼﻔﻮﻓﺔ ﰲ ﻋﻨﺼﺮ ﻛﻞ وﺟﻮد‬ //‫ﺑﺎﺳﺘﺒﺪال ﯾﻘﻮم ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬
#include<stdio.h> ‫ﰲ اﺧﺮى ﻗﯿﻤﺔ ﻣﻜﺎن ﻗﯿﻤﺔ‬
#include<iostream.h> ‫ﻣﺼﻔﻮﻓﺔ‬
#include<conio.h>
main() #include<stdio.h>
{
clrscr(); #include<iostream.h>
int
a[20],x,n,z,i,j,k1[20],k=0,y=0,b[ #include<conio.h>
20],m=0; main()
cout<<"enter long {
matrex"; clrscr();
cin>>n; int
for(i=1; i<=n;i++) a[20],x,x1,n,i,k=0;
{ cout<<"enter
cout<<"enter long matrex";
a["<<i<<"]="; cin>>n;
cin>>a[i]; for(i=1;
} i<=n;i++)
for(i=1; i<=n;i++) {
cout<<a[i]<<" "; cout<<"enter
cout<<endl; a["<<i<<"]";
cin>>a[i];

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
for(i=1; i<=n;i++) }
for(j=1; j<=n;j++) for(i=1;
if(a[i]<=a[j]) i<=n;i++)
{ z=a[i]; a[i]=a[j]; cout<<a[i]<<"
a[j]=z; } ";
for(i=1; i<=n;i++){ cout<<endl;
for(j=1; j<=n;j++){ cout<<"enter
b[1]=a[1]; x";
if(a[i]!=b[m]) cin>>x;
{ m=m+1; b[m]=a[i];} cout<<"enter
if(a[i]==a[j]) elemet in the matrex";
y=y+1; cin>>x1;
if(j==n){
k1[m]=y;y=0;} for(i=1;
} i<=n;i++)
} if(x1==a[i]){
cout<<endl; a[i]=x;
for(i=1; i<=m;i++) k=k+1;
cout<<b[i]<<" }
"<<k1[i]<<endl; if(k==0)
getch(); cout<<"not
} found"<<endl;
for(i=1;
i<=n;i++)
cout<<a[i]<<"
";
getch();
}
//22 ‫ﻃﺒﺎﻋﺔ ﻋﻠﻰ ﯾﻌﻤﻞ ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬ //‫ﻟﻄﺒﺎﻋﺔ داﻟﺔ ﻓﯿﻬﺎ ﻣﺼﻔﻮﻓﺔ‬
‫اﻟﻌﺪد اﱃ ﯾﺼﻞ ان اﱃ اﻟﻌﺪد ﻣﻀﺎﻋﻔﺎت‬ ‫ﻋﻨﺼﺮ ﻋﻦ ﻟﻠﺒﺤﺚ وداﻟﺔ ﻋﻨﺎﺻﺮﻫﺎ‬
100 . ‫ﻟﻠﺠﻤﻊ وداﻟﺔ‬
#include<iostream.h> #include<iostream.h>
#include<conio.h> #include<conio.h>
#include<math.h> void insertelementarray(int
a[],int n)
void main() {

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
{ for(int i=0;i<n;i++){
int n,x=1; cout<<"a["<<i<<"]= ";
cout<<"enter anumber"; cin>>a[i];}
cin>>n; }
for(int i=1;x<100;i++) void printarray(int a[],int
{ n)
x=n*i; {
cout<<x<<"\t"; for(int i=0;i<n;i++)
}} cout<< a[i]<<"\t";

}
void sumelementarray(int
a[],int n){
long sum=0;
for(int i=0;i<n;i++){
sum=sum+a[i];}
//‫ﻛﻞ ﻃﺒﺎﻋﺔ ﻋﻠﻰ ﯾﻌﻤﻞ ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬ cout<<"\n sumation every
‫ﻛﻞ وود ﻋﺪد وﻛﺒﺎﻋﺔ ﻣﺼﻔﻮﻓﺔ ﰲ ﻋﻨﺼﺮ‬ element in array = "<<sum;
‫ﻓﯿﻬﺎ ﻋﻨﺼﺮ‬ }
void search(int a[],int
#include<stdio.h> n){
#include<iostream.h> int b=0,s;
#include<conio.h> cout<<"\n input the number
main() yuor searched:";
{ cin>>s;
clrscr(); for(int i=0;i<=n;i++)
int if(s==a[i]){
a[20],x,n,z,i,j,k1[20],k=0,y=0,b[ b=1;
20],m=0; break;}
cout<<"enter long if(b==1)
matrex"; cout<<"\nThe number found
cin>>n; in array";
for(i=1; i<=n;i++) else
{ cout<<"\nThe number not
cout<<"enter found in array";
a["<<i<<"]="; }

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
cin>>a[i]; main()
} {
for(i=1; i<=n;i++) int a[100],n,i;
cout<<a[i]<<" "; cout<<"insert size of
cout<<endl; array : ";
cin>>n;
for(i=1; i<=n;i++) insertelementarray(a,n);
for(j=1; j<=n;j++) printarray(a,n);
if(a[i]<=a[j]) sumelementarray(a,n);
{ z=a[i]; a[i]=a[j]; search(a,n);
a[j]=z; } getch();
for(i=1; i<=n;i++){ }
for(j=1; j<=n;j++){
b[1]=a[1];
if(a[i]!=b[m])
{ m=m+1; b[m]=a[i];}
if(a[i]==a[j])
y=y+1;
if(j==n){
k1[m]=y;y=0;}
}
}
cout<<endl;
for(i=1; i<=m;i++)
cout<<b[i]<<"
"<<k1[i]<<endl;
getch();
}
/* A //‫ﻓﻘﻂ اﻟﻔﺮدﯾﺔ اﻻﻋﺪاد‬
BCDE #include<iostream.h>
FGHIJKL #include<conio.h>
MNOPQRSTVU
*/ main()
//25 { int
#include<iostream.h> a[100],b[100],c[100];
#include<conio.h> int n,n1=0,i;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
#include<math.h> cout<<"insert size of
array: ";
void main() cin>>n;
{ for(i=0;i<n;i++){
int n; cout<<"a["<<i<<"]=";
cout<<"enter anumber of colnnade cin>>a[i];
"; }
cin>>n;
int a=65; for(i=0;i<n;i++)
char b; if(a[i]%2!=0){
b=a; n1++;
for(int i=1;i<=n;i++) c[n1]=a[i];}
{
for(i=1;i<=n1;i++)
for(int j=1;j<=n-1;j++){ cout<<c[i]<<"\t";
if(j>n-i) getch();
cout<<b++; }
else
cout<<" ";}
for(int k=1;k<=2*i-1;k++)
cout<<b++;
cout<<"\n";
}}

//‫ﯾﻘﻮم ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬ //‫ﻋﻨﺼﺮ ﰲ ﻣﺼﻔﻮﻓﺔ‬


‫ﻣﺼﻔﻮﻓﺔ ﰲ ﻣﻌﲔ ﻋﻨﺼﺮ ﲝﺬف‬ ‫اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﲢﺬف‬

#include<stdio.h>
#include<iostream.h> #include<stdio.h>
#include<conio.h>
main() #include<iostream.h>
{
clrscr(); #include<conio.h>
int main()
a[20],x,index,n,i,j,k; {

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
cout<<"enter long clrscr();
matrex"; int
cin>>n; a[20],x,index,n,i,j,k;
for(i=1; i<=n;i++) cout<<"enter
{ long matrex";
cout<<"enter cin>>n;
a["<<i<<"]="; for(i=1;
cin>>a[i]; i<=n;i++)
} {
for(i=1; i<=n;i++) cout<<"enter
cout<<a[i]<<" "; a["<<i<<"]=";
cout<<endl; cin>>a[i];
cout<<"enter x"; }
cin>>x; for(i=1;
k=0; i<=n;i++)
for(i=1; i<=n;i++) cout<<a[i]<<"
if(x==a[i]) ";
{ cout<<endl;
k=k+1; cout<<"enter
for(j=i; j<=n;j++) x";
a[j]=a[j+1]; cin>>x;
n=n-1; k=0;
} for(i=1;
if(k==0) i<=n;i++)
cout<<"not if(x==a[i])
found"<<endl; {
for(i=1; i<=n;i++) k=k+1;
cout<<a[i]<<" "; for(j=i;
getch(); j<=n;j++)
} a[j]=a[j+1];
n=n-1;
}
if(k==0)
cout<<"not
found"<<endl;
for(i=1;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
i<=n;i++)
cout<<a[i]<<"
";
getch();
}
//‫اﻻﻋﺪاد ﺑﱰﺗﯿﺐ ﯾﻘﻮم ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬
‫واﻻﻋﺪاد ﺟﻬﺔ ﰲ ﻣﺼﻔﻮﻓﺔ ﰲ اﻟﻔﺮدﯾﺔ‬ //‫ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬
‫اﺧﺮى ﺟﻬﻪ ﰲ اﻟﺰوﺟﯿﺔ‬ ‫ﰲ اﳌﻜﺮرة اﻟﻌﻨﺎﺻﺮ ﻋﻦ ﯾﺒﺤﺚ‬
‫ﻣﻊ ﺑﻄﺒﺎﻋﺘﻬﺎ وﯾﻘﻮم ﻣﺼﻔﻮﻓﺔ‬
#include<stdio.h> ‫ﺗﻜﺮارﻫﺎ ﻋﺪد‬
#include<iostream.h>
#include<conio.h> #include<stdio.h>
main()
{ #include<iostream.h>
clrscr();
int #include<conio.h>
a[20],x,index,n,i,j,z; main()
cout<<"enter long {
matrex"; clrscr();
cin>>n; int
for(i=1; i<=n;i++) a[20],x,n,z,i,j,k1[20],k=0,
{ y=0,b[20],m=0;
cout<<"enter cout<<"enter
a["<<i<<"]="; long matrex";
cin>>a[i]; cin>>n;
} for(i=1;
for(i=1; i<=n;i++) i<=n;i++)
cout<<a[i]<<" "; {
cout<<endl; cout<<"enter
for(i=1; i<=n-1;i++) a["<<i<<"]";
for(j=i+1; j<=n;j++) cin>>a[i];
if(a[i]%2!=0) }
{ for(i=1;
z=a[i]; a[i]=a[j]; i<=n;i++)
a[j]=z; } cout<<a[i]<<"
cout<<"The matrex ";

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
after "<<endl; cout<<endl;
for(i=1; i<=n;i++)
cout<<a[i]<<" "; for(i=1;
getch(); i<=n;i++)
} for(j=1;
j<=n;j++)
if(a[i]<=a[j])
{ z=a[i];
a[i]=a[j]; a[j]=z; }
for(i=1;
i<=n;i++){
for(j=1;
//‫اﻻﻋﺪاد اﻻوﻟﯿﺔ ﰲ اﳌﺼﻔﻮﻓﺔ‬ j<=n;j++){
‫اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ‬ b[1]=a[1];
#include<stdio.h> if(a[i]!=b[m])
#include<iostream.h> { m=m+1;
#include<conio.h> b[m]=a[i];}
main() if(a[i]==a[j])
{ y=y+1;
clrscr(); if(j==n){
int a[20],x,n,i,j,k; k1[m]=y;y=0;}
cout<<"enter long }
matrex"; }
cin>>n; cout<<endl;
for(i=1; i<=n;i++) for(i=1;
{ i<=m;i++)
cout<<"enter {
a["<<i<<"]="; if(k1[i]>1)
cin>>a[i]; cout<<b[i]<<"
} "<<k1[i]<<endl;
for(i=1; i<=n;i++) }
cout<<a[i]<<" "; getch();
cout<<endl; }
cout<<"The all number of //‫ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬
praim is"<<endl; ‫اﻻﻋﺪاد ﻋﻦ ﺑﺎﻟﺒﺤﺚ ﯾﻘﻮم‬
for(i=1; i<=n;i++) ‫ﻣﺼﻔﻮﻓﺔ ﰲ اﻟﻔﺮدﯾﺔ‬

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
{
k=0;
for(j=1; j<=a[i];j++) #include<stdio.h>
if(a[i]%j==0)
k=k+1; #include<iostream.h>
if(k==2)
cout<<a[i]<<" "; #include<conio.h>
} main()
getch(); {
‫}اﳌﺼﻔﻮﻓﺔ‬// clrscr();
//‫ﻛﻞ ورﺗﺒﺔ ﻣﺼﻔﻮﻓﺔ ﰲ اﻻوﻟﯿﺔ اﻻﻋﺪاد‬ int
‫ﻋﻨﺼﺮ‬ a[20],x,index,n,i,j,k;
#include<iostream.h> cout<<"enter
#include<conio.h> long matrex";
cin>>n;
main() for(i=1;
{ int a[100],b[100],c[100]; i<=n;i++)
int n,i; {
cout<<"insert size of array: "; cout<<"enter
cin>>n; a["<<i<<"]=";
for(int j=0;j<n;j++){ cin>>a[i];
cout<<"a["<<j<<"]="; }
cin>>a[j]; for(i=1;
} cout<<endl; i<=n;i++)
for(int s=0;s<n;s++){ cout<<a[i]<<"
for ( i=2 ; i<=a[s]-1; i++ ) ";
{if(a[s]%i==0) cout<<endl;
break ; cout<<"The
} numbur AL ood"<<endl;
if(i-1==a[s]-1) for(i=1;
cout <<a[s]<<" is prime"; i<=n;i++)
else if(a[i]%2!=0)
cout<<"\n"; } cout<<a[i]<<"
getch (); ";
getch();
} }

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
//‫ﻻﺿﺎﻓﺔ ﺑﺮﻧﺎﻣﺞ اﻛﺘﺐ‬
‫وذﻟﻚ ﻣﻌﲔ ﻣﻮﻗﻊ ﰲ ﻣﺼﻔﻮﻓﺔ اﱃ ﻋﻨﺼﺮ‬
‫اﻟﺴﺎﺑﻖ اﻟﻌﻨﺼﺮ ﺑﺎزاﺣﺔ‬
#include<stdio.h>
#include<iostream.h>
#include<conio.h>
main() //‫ﻛﻞ اﱃ ﻋﻤﻠﺔ ﻣﻦ اﻟﺼﺮاف‬
{ ‫اﻟﻌﻤﻼت‬
clrscr(); #include<iostream.h>
int #include<conio.h>
a[20],x,index,n,i; #include<math.h>
cout<<"enter long main()
matrex"; {
cin>>n; double
for(i=1; i<=n;i++) b,Yemen,Oman,sudia,USA,Egyp
{ t,Kuait,Yorou,Astrline,UEA;
cout<<"enter char z=0 ;
a["<<i<<"]"; cout<<"\n the tapys :
cin>>a[i]; Yemen=Y , Oman=O ,
} sudia=S , USA=D \n\n";
for(i=1; i<=n;i++) cout<<" Egypt=E ,
cout<<a[i]<<" "; Kuait=K , Yorou=R ,
cout<<endl; Astrline=A , UEA=U
cout<<"enter x"; \n\n";
cin>>x; cout<<" enter the Value :
cout<<"enter index ";
x"; cin>>b;
cin>>index; cout<<" enter the tapy : ";
for(i=n; i>=index;i-- cin>>z;
) if (z=='Y' || z=='y'){
a[i+1]=a[i]; Oman = b/575;
a[index]=x; sudia = b/60;
n=n+1; USA = b/225;
for(i=1; i<=n;i++) Egypt = b/40;
cout<<a[i]<<" "; Kuait = b/777;
getch(); Yorou = b/288;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
} Astrline = b/333;
UEA = b/54;
//‫ﻻي ﻋﻤﻠﺔ اي ﻣﻦ ﳛﻮل ﺑﺮﻧﺎﻣﺞ‬ cout<<"\n\t
‫اﺧﺮى ﻋﻤﻠﺔ‬ Oman="<<Oman<<"\t
#include<iostream.h> sudia="<<sudia<<"\t
#include<conio.h> USA="<<USA;
main() cout<<"\n\t
{ Egypt="<<Egypt<<"\t
long d,x; Kuait="<<Kuait<<"\t
clrscr(); Yorou="<<Yorou<<"\t
cout<<"\ninput 1 to change Astrline="<<Astrline <<"\t
from RS to RY\n"; UEA="<<UEA; }
cout<<"\ninput 2 to change else if (z=='s' || z=='S'){
from RY to RS\n"; Oman = b/9.58;
cout<<"\ninput 3 to change Yemen = b*60;
form $ to RY\n"; USA = b/3.75;
cout<<"\ninput 4 to change Egypt = b/1.5;
form RY to $\n"; Kuait = b/12.95;
cout<<"\ninput 5 to change Yorou = b/4.8;
form $ to RS\n"; Astrline = b/5.55;
cout<<"\ninput 6 to change UEA = b/1.11;
form Rs to $\n"; cout<<"\n\t
cout<<"\ninput 7 to change Oman="<<Oman<<"\t
form YR to RY\n"; yemen="<<Yemen<<"\t
cout<<"\ninput 8 to change USA="<<USA<<"\t
form Ry to YR\n"; Egypt="<<Egypt;
cout<<"\ninput 9 to change cout<<"\n\t
form DR to RY\n"; Kuait="<<Kuait<<"\t
cout<<"\ninput 10 to change form Yorou="<<Yorou<<"\t
RY to DR\n"; Astrline="<<Astrline<<"\t
cin>>x; UEA="<<UEA; }
cout<<"pleace input value else if (z=='E' || z=='e'){
money("; Oman = b/14.38;
cin>>d; cout<<"your money Yemen = b*40;
=("; USA = b/5.63;
switch(x) sudia = b/1.5;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
{ Kuait = b/19.43;
case 1: cout<<d*60<<" RY)"; Yorou = b/7.2;
break; Astrline = b/8.32;
case 2: cout<<d/60<<" RS)"; UEA = b/1.35;
break; cout<<"\n\t
case 3: cout<<d*225<<" RY)"; Oman="<<Oman<<"\t
break; yemen="<<Yemen<<"\t
case 4: cout<<d/225<<" $)"; USA="<<USA<<"\t
break; sudia="<<sudia;
case 5: cout<<d*200<<" RS)"; cout<<"\n\t
break; Kuait="<<Kuait<<"\t
case 6: cout<<d/200<<" $)"; Yorou="<<Yorou<<"\t
break; Astrline="<<Astrline<<"\t
case 7: cout<<d*300<<" RY)"; UEA="<<UEA; }
break; else if (z=='O' || z=='o'){
case 8: cout<<d/300<<" YR)"; Egypt = b*14.38;
break; Yemen = b*575;
case 9: cout<<d*60<<" RY)"; USA = b*2.65;
break; sudia = b*9.58;
case 10 : cout<<d/60<<" DR)"; Kuait = b/1.35;
break; Yorou = b*2;
} Astrline = b*1.73;
} UEA = b*10.65;
cout<<"\n\t
Oman="<<Oman<<"\t
// yemen="<<Yemen<<"\t
#include<iostream.h> USA="<<USA<<"\t
int A , B , C,Y1,Y2; sudia="<<sudia;
void logic () cout<<"\n\t
{ Kuait="<<Kuait<<"\t
Y1=(!A&&B&&C)||(A&&!B&&!C)||(!A&& Yorou="<<Yorou<<"\t
!B&&!C)||(A&&!B&&C)||(A&&B&&C); Astrline="<<Astrline<<"\t
Y2=((B&&C)||(A&&!B)||(!B&&!C)); UEA="<<UEA; }
} else if (z=='d' || z=='d'){
void print () Oman = b/2,65;
{ Yemen = b*225;

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
cout<<A<<" : \t"<<B<<" : Egypt = b/5.63;
\t"<<C<<" : \t"<<Y1<<" : sudia = b*3.75;
\t"<<Y2<<endl; Kuait = b/3.45;
} Yorou = b/1.28;
main() Astrline = b/1.48;
{ UEA = b/4.17;
cout<<"A : \t"<<"B : \t"<<"C : cout<<"\n\t
\t"<<"Y1 : \t"<<"Y2 "<<endl; Oman="<<Oman<<"\t
cout<<".......................... yemen="<<Yemen<<"\t
........\n"; Egypt="<<Egypt<<"\t
for (int i=0;i<=7;i++) sudia="<<sudia;
{ cout<<"\n\t
switch (i) Kuait="<<Kuait<<"\t
{ Yorou="<<Yorou<<"\t
case 0: A=B=C=0 ; Astrline="<<Astrline<<"\t
logic(); UEA="<<UEA; }
print(); break ; else if (z=='K' || z=='k'){
case 1: A=B=0,C=1 ; Oman = b*14.35;
logic(); Yemen = b*777;
print(); break ; USA = b*3.45;
case 2: A=0,B=1,C=0 ; sudia = b*12.95;
logic(); Egypt = b*19.43;
print(); break ; Yorou = b*2.7;
case 3: A=0,B=C=1 ; Astrline = b*2.33;
logic(); UEA = b*14.39;
print(); break ; cout<<"\n\t
case 4: A=1,B=C=0 ; Oman="<<Oman<<"\t
logic(); yemen="<<Yemen<<"\t
print(); break ; USA="<<USA<<"\t
case 5: A=1,B=0,C=1 ; sudia="<<sudia;
logic(); cout<<"\n\t
print(); break ; Egypt="<<Egypt<<"\t
case 6: A=B=1,C=0 ; Yorou="<<Yorou<<"\t
logic(); Astrline="<<Astrline<<"\t
print(); break ; UEA="<<UEA; }
case 7: A=B=C=1 ; else if (z=='R' || z=='r'){

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
logic(); Oman = b/2;
print(); break ; Yemen = b*288;
default : cout<<"error "; USA = b*1.28;
break; sudia = b*4.8;
} Kuait = b/2.7;
} Egypt = b*2.7;
return 0; Astrline = b/1.16;
} UEA = b*5.33;
cout<<"\n\t
Oman="<<Oman<<"\t
yemen="<<Yemen<<"\t
USA="<<USA<<"\t
sudia="<<sudia;
cout<<"\n\t
Kuait="<<Kuait<<"\t
Egypt="<<Egypt<<"\t
Astrline="<<Astrline<<"\t
UEA="<<UEA; }
else if (z=='A' || z=='a'){
Oman = b/1.73;
Yemen = b*333;
USA = b*1.48;
sudia = b*5.55;
Kuait = b/2.33;
Yorou = b*1.16;
Egypt = b*8.32;
UEA = b*6.17;
cout<<"\n\t
Oman="<<Oman<<"\t
yemen="<<Yemen<<"\t
USA="<<USA<<"\t
sudia="<<sudia;
cout<<"\n\t
Kuait="<<Kuait<<"\t
Yorou="<<Yorou<<"\t
Egypt="<<Egypt<<"\t

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/
 ‫م‬– ‫ ا‬ -‫د ا‬– ‫ ا‬ -: ‫ب‬‫اد ا‬‫ا‬
UEA="<<UEA; }
else if(z=='U' || z=='u'){
Oman = b/10.65;
Yemen = b*54;
USA = b/4.17;
sudia = b/1.11;
Kuait = b/14.39;
Yorou = b/5.33;
Egypt = b*1.35;
Astrline = b/6.17;
cout<<"\n\t
Oman="<<Oman<<"\t
yemen="<<Yemen<<"\t
USA="<<USA<<"\t
sudia="<<sudia;
cout<<"\n\t
Kuait="<<Kuait<<"\t
Yorou="<<Yorou<<"\t
Astrline="<<Astrline<<"\t
Egypt="<<Egypt; }
getch();
return 0;
}

ً ‫ا‬ ‫ ا‬‫ر ا‬‫ ا‬ ‫اءة‬‫ ا‬

This page was created using PDF Printer trial software.


To purchase, go to http://pdfprinter.pdftools.de/

You might also like