SlideShare a Scribd company logo
1 of 26
Download to read offline
‫ر‬‫ض‬‫ا‬‫حمل‬‫ا‬:‫ي‬‫ق‬‫و‬‫ر‬‫د‬‫ل‬‫ا‬ ‫د‬‫و‬‫ع‬‫س‬‫م‬ ‫مل‬‫ا‬‫س‬
‫اجلافا‬ ‫بلغة‬ ‫الربجمة‬ ‫اساسيات‬
‫انمحاضرة‬:‫انرابعت‬
‫انشرط‬ ‫جمم‬(‫انقرار‬)
Condtional Statements
‫جمهت‬if‫انمتذاخهت‬(nested if statement)
‫املرقب‬ ‫جامعة‬/‫اخلمس‬
‫الرتبية‬ ‫كلية‬-‫اخلمس‬/‫اخلميس‬ ‫سوق‬
Out lines
‫مجلة‬if‫املتداخلة‬
‫مجلة‬‫لكتابة‬ ‫العام‬‫الشكل‬if‫املتداخلة‬
‫مجلة‬‫لكتابة‬ ‫العام‬‫الشكل‬if‫املزدوجة‬ ‫املتداخلة‬
‫مجلة‬ ‫الستخدام‬ ‫امجلة‬if‫املتداخلة‬
‫املؤثرات‬ ‫استخدام‬‫مع‬‫املنطقية‬‫مجلة‬if
‫مجلة‬else if
‫جلملة‬ ‫العام‬‫الشكل‬else if
‫مجلة‬ ‫الستخدام‬ ‫امجلة‬else if
2
‫جمهت‬if‫انمتذاخهت‬
‫المحاضر‬:‫الدروقي‬ ‫سالم‬
3
ُ٘‫رزن‬‫خَيخ‬if‫اىَزذاخيخ‬ٍِ‫خَيخ‬if‫ٗٝ٘خذ‬‫ثذاخيٖب‬‫خَيخ‬ifٙ‫اخش‬‫ثحٞث‬ُ٘‫ٝن‬
‫ىنو‬‫ٍَْٖب‬‫ششط‬ِٞ‫ٍع‬.
‫حٞث‬ُ‫ا‬‫خ٘اة‬‫اىششط‬ٜ‫ف‬ٓ‫ٕز‬‫اىحبىخ‬ٕ٘‫عجبسح‬ِ‫ع‬‫خَيخ‬ifٛ‫اخش‬‫رعزجش‬‫ششطب‬‫اخش‬
‫ىزْفٞز‬‫خ٘اة‬‫اىششط‬ٛ‫ٗاىز‬ِ‫ى‬‫ْٝفذ‬‫إال‬‫ثزحقق‬ِٞ‫اىششط‬‫ٍعب‬(‫اىششط‬ٜ‫ف‬‫اىدَيخ‬
‫اىخبسخٞخ‬‫ٗاىششط‬ٜ‫ف‬‫اىدَيخ‬‫اىذاخيٞخ‬)
ِ‫َٗٝن‬‫مزبثخ‬‫خَيخ‬‫اىششط‬‫اىَزذاخيخ‬‫اٍب‬‫ثطشٝقخ‬‫مزبثخ‬‫خَيخ‬‫اىششط‬‫اىجسٞطخ‬ٗ‫ا‬
‫اىَضدٗخخ‬‫س٘اء‬ُ‫مب‬‫خ٘اة‬‫اىششط‬‫ٍنّ٘ب‬ٍِ‫خَيخ‬‫ٗاحذح‬ٗ‫ا‬‫امثش‬ٍِ‫خَيخ‬.
‫جمهت‬ ‫نكتابت‬ ‫انعاو‬ ‫انشكم‬if‫انمتذاخهت‬
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
4
‫ٗاحذح‬ ‫خَيخ‬ ٍِ ً‫ب‬ّ٘‫ٍن‬ ‫اىششك‬ ‫خ٘اة‬ ُ‫مب‬ ‫ارا‬
1. if (Logical Condition) // ‫اىششط‬ ‫خَيخ‬+‫االٗه‬ ‫اىششط‬
2. if (Logical Condition) // ‫اىششط‬ ‫خَيخ‬+ّٜ‫اىثب‬ ‫اىششط‬
3. Statment 1 // ‫اىششط‬ ‫خ٘اة‬
4. Next statement
‫خَيخ‬ ٍِ ‫امثش‬ ٍِ ً‫ب‬ّ٘‫ٍن‬ ‫اىششط‬ ‫خ٘اة‬ ُ‫مب‬ ‫ارا‬
1. if (Logical Condition) // ‫اىششط‬ ‫خَيخ‬+‫االٗه‬ ‫اىششط‬
2. if (Logical Condition) // ‫اىششط‬ ‫خَيخ‬+ّٜ‫اىثب‬ ‫اىششط‬
3. {
4. Statment 1 // ‫اىششط‬ ‫خ٘اة‬
5. Statment 1
6. }
7. Next statement
‫جمهت‬ ‫نكتابت‬ ‫انعاو‬ ‫انشكم‬if‫انمزدوجت‬ ‫انمتذاخهت‬
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
5
1. if (Logical Condition1) // ‫اىششط‬ ‫خَيخ‬+‫االٗه‬ ‫اىششط‬
2. if (Logical Condition2) // ‫اىششط‬ ‫خَيخ‬+ّٜ‫اىثب‬ ‫اىششط‬
3. {
4. Statment 1 // ‫اىششط‬ ‫خ٘اة‬ِٞ‫اىششط‬ ‫رحقق‬ ‫حبىخ‬ ٜ‫ف‬
5. Statment 1
6. }
7. else
8. {
9. Statment 1 // ‫خ٘اة‬ِٞ‫اىششط‬ ‫رحقق‬ ً‫عذ‬ ‫حبىخ‬ ٜ‫ف‬ ‫اىششط‬
10. Statment 1
11. }
12. Next statement
‫اكتب‬‫أكبشهوا‬ ‫ويطبع‬ ‫أعذاد‬ ‫ثالثت‬ ‫باستقبال‬ ‫يقىم‬ ‫بشًاهج‬.
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
6
‫هثال‬:
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
7
‫خَيخ‬ ً‫ثبسزخذا‬IF‫امزت‬ ‫اىَزذاخيخ‬ٔ‫ٗدسخز‬ ‫اىطبىت‬ ٌ‫اس‬ ‫ثئدخبه‬ ً٘‫ٝق‬ ‫ثشّبٍح‬(‫طحٞح‬ ‫معذد‬
)ٗ ‫اىطبىت‬ ٌ‫اس‬ ‫ٗٝطجع‬ ‫اىجشٍدخ‬ ‫أسبسٞبد‬ ‫ٍبدح‬ ٜ‫ف‬.....
‫ميَخ‬EXCELLENTٍِ ‫اىذسخخ‬ ‫مبّذ‬ ‫إرا‬85ٚ‫إى‬100
‫ميَخ‬VERY GOODٍِ ‫اىذسخخ‬ ‫مبّذ‬ ‫إرا‬75ٚ‫إى‬84
‫ميَخ‬GOODٍِ ‫اىذسخخ‬ ‫مبّذ‬ ‫إرا‬65ٚ‫إى‬74
‫ميَخ‬PASSٍِ ‫اىذسخخ‬ ‫مبّذ‬ ‫إرا‬50ٚ‫إى‬64
‫ميَخ‬WEEKٍِ ‫اىذسخخ‬ ‫مبّذ‬ ‫إرا‬0ٚ‫إى‬49
‫ٗميَخ‬ERROR‫إرا‬‫رىل‬ ‫غٞش‬ ‫اىَذخو‬ ‫اىعذد‬ ُ‫مب‬.
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬ 8
‫اكتب‬‫بشًاهج‬‫يقىم‬‫بإدخال‬‫اسن‬‫شخص‬‫هتقذم‬‫لىظيفت‬‫ها‬‫وكزلك‬‫عوشة‬‫وعذد‬‫سٌىاث‬
‫الخبشة‬‫تن‬‫يقىم‬‫بطباعت‬‫اسن‬‫الوتقذم‬‫و‬‫كلوت‬‫هقبىل‬‫ارا‬‫كاى‬‫عوش‬‫الوتقذم‬‫هابيي‬18-40
‫وخبشته‬‫اكبش‬‫هي‬5‫سٌىاث‬.
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
9
‫ٗاحذح‬ ‫دفعخ‬ ‫ششٗط‬ ‫ثالثخ‬ ‫رحقق‬ ‫اىششط‬ ‫خَيخ‬ ‫رْفٞز‬ ‫ٝزطيت‬ ‫اىَثبه‬ ‫ٕزا‬ ٜ‫ف‬
‫خَو‬ ‫ثالثخ‬ ‫مزبثخ‬ ٚ‫اى‬ ‫ٝحزبج‬ ‫اىَجشٍح‬ ُ‫فب‬ ٜ‫ثبىزبى‬if‫اىجشّبٍح‬ ٜ‫ف‬ ‫ٍزذاخيخ‬.
‫االٗه‬ ‫اىششط‬:ٍِ ‫امجش‬ ‫اىعَش‬ ُ٘‫ٝن‬ ُ‫ا‬18‫سْخ‬.
ّٜ‫اىثب‬ ‫اىششط‬:ٍِ ‫اقو‬ ‫اىعَش‬ ُ٘‫ٝن‬ ُ‫ا‬40‫سْخ‬.
‫اىثبىث‬ ‫اىششط‬:ٍِ ‫امجش‬ ‫اىخجشح‬ ‫سْ٘اد‬ ‫عذد‬ ُ٘‫ٝن‬ ُ‫ا‬5‫سْ٘اد‬.
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬ 10
‫استخذاو‬‫انمؤثراث‬‫انمنطقيت‬
‫جمهت‬ ‫مع‬if
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
11
‫اىششط‬ ‫خَيخ‬ ‫ٍع‬ ‫اىَْطقٞخ‬ ‫اىَؤثشاد‬ ً‫رسزخذ‬if‫اىزقيٞو‬ ٜ‫ٗثبىزبى‬ ‫ٗظبئفٖب‬ ‫صٝبدح‬ ‫ىغشع‬
‫خَو‬ ‫عذد‬ ٍِifٜ‫ف‬‫فَٞب‬ ‫اىششٗط‬ ‫ىشثط‬ ً‫رسزخذ‬ ‫مَب‬ ‫اىجشّبٍح‬‫اىَؤثشاد‬ ٓ‫ٕٗز‬ ‫ثْٖٞب‬.
-‫الموثر‬AND:‫ٝنزت‬ٜ‫اىزبى‬ ‫ثبىشنو‬ ‫اىيغخ‬ ٜ‫ف‬"&&"‫وهو‬ٜ‫ٍْطق‬ ‫ٍؤثش‬
‫طبئجخ‬ ‫االحزَبالد‬ ‫خَٞع‬ ‫مبّذ‬ ‫ارا‬ ‫طبئجخ‬ ٔ‫ّزٞدز‬ ُ٘‫رن‬ ٜ‫ثْبئ‬
‫ا‬‫لمؤثر‬OR:‫يكتب‬‫التالي‬ ‫بالشكل‬ ‫اللغة‬ ‫في‬"||"‫وهو‬ُ٘‫رن‬ ّٜ‫ثْب‬ ٜ‫ٍْطق‬ ‫ٍؤثش‬
‫طبئجخ‬ ‫االحزَبالد‬ ‫احذ‬ ‫مبّذ‬ ‫ارا‬ ‫طبئجخ‬ ٔ‫ّزٞدز‬.
‫المؤثر‬Not:‫يكتب‬‫التالي‬ ‫بالشكل‬ ‫اللغة‬ ‫في‬! ""‫وهو‬‫ٍؤثش‬ٛ‫احبد‬ ٜ‫ٍْطق‬
‫ٗاىعنس‬ ‫خبطئخ‬ ‫رظجح‬ ‫طبئجخ‬ ‫اىششط‬ ‫ّزٞدخ‬ ‫مبّذ‬ ‫ارا‬ ّٔ‫ا‬ ْٜ‫ثَع‬ ‫اىششط‬ ٜ‫ىْف‬ ً‫ٝسزخذ‬
‫طحٞح‬.
‫هثال‬:‫أكبشهوا‬ ‫ويطبع‬ ‫أعذاد‬ ‫ثالثت‬ ‫باستقبال‬ ‫يقىم‬ ‫بشًاهج‬ ‫اكتب‬.
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
12
import java.util.Scanner;
public class First
{
public static void main(String[] args)
{
Scanner input= new Scanner (System.in);
int x1,x2,x3;
System.out.print( "Enter the first number");
x1=input.nextInt();
System.out.print( "Enter the Second number");
x2=input.nextInt();
System.out.print( "Enter the Third number");
x3=input.nextInt();
if ( x1 > x2 && x1>x3)
System.out.println( "X1=" + x1 + " Is greater than all");
if ( x2 > x1 && x2>x3)
System.out.println( "X2=" + x2 + " Is greater than all");
if ( x3 > x2 && x3>x1)
System.out.println( "X3=" + x3 + " Is greater than all");
}}
‫مثال‬:
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
13
2.ً‫ثبسزخذا‬‫خَيخ‬ ‫ٍع‬ ‫اىَْطقٞخ‬ ‫اىَؤثشاد‬IF‫اىطبىت‬ ٌ‫اس‬ ‫ثئدخبه‬ ً٘‫ٝق‬ ‫ثشّبٍح‬ ‫امزت‬
ٔ‫ٗدسخز‬(‫طحٞح‬ ‫معذد‬)ٗ ‫اىطبىت‬ ٌ‫اس‬ ‫ٗٝطجع‬ ‫اىجشٍدخ‬ ‫أسبسٞبد‬ ‫ٍبدح‬ ٜ‫ف‬.....
‫ميَخ‬EXCELLENTٍِ ‫اىذسخخ‬ ‫مبّذ‬ ‫إرا‬85ٚ‫إى‬100
‫ميَخ‬VERY GOODٍِ ‫اىذسخخ‬ ‫مبّذ‬ ‫إرا‬75ٚ‫إى‬84
‫ميَخ‬GOODٍِ ‫اىذسخخ‬ ‫مبّذ‬ ‫إرا‬65ٚ‫إى‬74
‫ميَخ‬PASSٍِ ‫اىذسخخ‬ ‫مبّذ‬ ‫إرا‬50ٚ‫إى‬64
‫ميَخ‬WEEKٍِ ‫اىذسخخ‬ ‫مبّذ‬ ‫إرا‬0ٚ‫إى‬49
‫ٗميَخ‬ERROR‫رىل‬ ‫غٞش‬ ‫اىَذخو‬ ‫اىعذد‬ ُ‫مب‬ ‫إرا‬.
‫المحاضر‬:‫الدروقي‬ ‫سالم‬ 14
import java.util.Scanner;
public class First
{
public static void main(String[] args)
{
Scanner input= new Scanner (System.in);
String name;
int grade;
System.out.print( "Enter student name");
name=input.next();
System.out.print( "Enter student grade");
grade=input.nextInt();
if ( grade >= 85 && grade <= 100)
System.out.println( name + " " +"Excellent");
if ( grade >= 75 && grade <= 84)
System.out.println( name +" " +"very good ");
if ( grade >= 65 && grade <= 74)
System.out.println( name +" " +"very good ");
if ( grade >= 50 && grade <= 64)
System.out.println( name +" " +"pass ");
if ( grade >= 0 && grade <=49 )
System.out.println( name +" " +"fail ");
if ( grade<0 || grade >100 )
System.out.println( name +" " +"Error ");
}
}
‫مثال‬:
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
15
ً٘‫ٝق‬ ‫ثشّبٍح‬ ‫امزت‬ ‫اىَْطقٞخ‬ ‫اىَؤثشاد‬ ً‫ثبسزخذا‬‫ثئدخبه‬
‫ٍب‬ ‫ى٘ظٞفخ‬ ً‫ٍزقذ‬ ‫شخض‬ ٌ‫اس‬
‫مزىل‬ ٗ‫عَشح‬
‫ٗعذد‬‫سْ٘اد‬‫اىخجشح‬
ٌ‫اس‬ ‫ثطجبعخ‬ ً٘‫ٝق‬ ٌ‫ر‬ً‫اىَزقذ‬
‫ٍقج٘ه‬ ‫ميَخ‬ ٗ
‫ارا‬ِٞ‫ٍبث‬ ً‫اىَزقذ‬ ‫عَش‬ ُ‫مب‬18-40
ٔ‫ٗخجشر‬ٍِ ‫امجش‬5‫سْ٘اد‬.
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬ 16
‫مثال‬:
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
17
‫امزت‬‫اىحشٗف‬ ‫احذ‬ ‫ثبسزقجبه‬ ً٘‫ٝق‬ ‫ثشّبٍح‬‫اىزبىٞخ‬:
R,Y,B,G,W )‫حشٗف‬‫طغٞشح‬ ٗ‫ا‬ ‫مجٞشح‬)‫ٝطجع‬ ٌ‫ث‬:
‫ميَخ‬RED‫إرا‬ٕ٘ ‫اىَذخو‬ ‫اىحشف‬ ُ‫مب‬Rٗ‫ا‬r
‫ميَخ‬YELLOWٕ٘ ‫اىَذخو‬ ‫اىحشف‬ ُ‫مب‬ ‫إرا‬Yٗ‫ا‬y
‫ميَخ‬BLUEٕ٘ ‫اىَذخو‬ ‫اىحشف‬ ُ‫مب‬ ‫إرا‬Bٗ‫ا‬b
‫ميَخ‬GREENٕ٘ ‫اىَذخو‬ ‫اىحشف‬ ُ‫مب‬ ‫إرا‬Gٗ‫ا‬g
‫ميَخ‬WHITEٕ٘ ‫اىَذخو‬ ‫اىحشف‬ ُ‫مب‬ ‫إرا‬Wٗ‫ا‬w
‫اىنيَخ‬ ‫ٗٝطجع‬Error‫رىل‬ ‫غٞش‬ ‫اىَذخو‬ ‫اىحشف‬ ُ‫مب‬ ‫ارا‬.
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬ 18
‫جمهت‬else if
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
19
ٜٕ‫عجبسح‬ِ‫ع‬‫ّ٘ع‬ٍِ‫اّ٘اع‬‫خَيخ‬if‫اىَزذاخيخ‬ٜ‫اىز‬ً‫رسزخذ‬‫عْذٍب‬ُ٘‫ٝن‬‫عذد‬
‫اىششٗط‬ٜ‫ف‬‫اىجشّبٍح‬‫مجٞش‬.
ً‫رسزخذ‬‫خَيخ‬else ifِٞ‫مزحس‬‫الداء‬‫خَيخ‬if‫اىجسٞطخ‬‫عْذٍب‬ُ٘‫ٝن‬‫ْٕبىل‬‫عذد‬‫مجٞش‬
ٍِ‫اىششٗط‬(ِ‫ى‬‫ٝزحقق‬‫اال‬ً‫ا‬‫ٗاحذ‬‫ٍْٖب‬‫فقط‬).
‫حٞث‬‫ر٘فش‬ٚ‫عي‬ٌ‫اىَزشخ‬‫اخزجبس‬‫ثقٞخ‬‫اىششٗط‬ٜ‫ف‬‫خَو‬‫اىششط‬ٜ‫ف‬‫حبىخ‬‫رحقق‬‫احذ‬
‫اىششٗط‬.
‫نجمهت‬ ‫انعاو‬ ‫انشكم‬else if
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
20
 if (Logical Condition) // ‫اىششط‬ ‫اداح‬+‫اىششط‬
 Statment 1
 else if (Logical Condition) // ‫اىششط‬ ‫اداح‬+‫اىششط‬
 Statment 1 // ‫اىششط‬ ‫خ٘اة‬
 else if (Logical Condition) // ‫اىششط‬ ‫اداح‬+‫اىششط‬
 Statment 1 // ‫اىششط‬ ‫خ٘اة‬
 else if (Logical Condition) // ‫اىششط‬ ‫اداح‬+‫اىششط‬
 Statment 1 // ‫اىششط‬ ‫خ٘اة‬
 Next statement
‫نجمهت‬ ‫انعاو‬ ‫انشكم‬ ‫بين‬ ‫مقارنت‬if‫وجمهت‬ ‫انبسيطت‬else if‫انمتذاخهت‬
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
21
‫جملة‬else if
1. if (Logical Condition)
2. Statment 1
3. else if (Logical Condition)
4. Statment 1
5. else if (Logical Condition)
6. Statment 1
7. else if (Logical Condition
8. Statment 1
9. Next satment
‫جملة‬if‫البسيطة‬
1. if (Logical Condition)
2. Statment 1
3. if (Logical Condition)
4. Statment 1
5. if (Logical Condition)
6. Statment 1
7. if (Logical Condition
8. Statment 1
9. Next satment
‫بين‬ ‫مقارنت‬‫عمم‬ ‫طريقت‬if‫وجمهت‬ ‫انبسيطت‬else if‫انمتذاخهت‬
‫انسابقت‬ ‫انشريحت‬ ‫في‬
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
22
ٜ‫ف‬‫خَيخ‬if‫اىجسٞطخ‬ً٘‫سٞق‬ٌ‫اىَزشخ‬‫ثبخزجبس‬‫مو‬‫اىششٗط‬‫ٗاحذا‬٘‫ري‬‫االخش‬‫اثزذأ‬ٍِ‫اىسطش‬ٌ‫سق‬
1‫فئرا‬‫رحقق‬‫احذ‬ٓ‫ٕز‬‫اىششٗط‬ٌ‫فسٞز‬‫رْفٞز‬‫خ٘اة‬‫اىششط‬ٔ‫ث‬ٌ‫ث‬ٌ‫ٝز‬‫االّزقبه‬‫الخزجبس‬‫ثقٞخ‬‫اىششٗط‬
‫ٗاحذا‬٘‫ري‬‫االخش‬(ٌ‫ثبىشغ‬ٌٍِ‫اىعي‬‫اىَسجق‬ّٔ‫ثب‬ِ‫ى‬‫ٝزحقق‬ٛ‫ا‬‫ٍْٖب‬).
ٜ‫ف‬‫خَيخ‬else ifً٘‫ٝق‬ٌ‫اىَزشخ‬‫ثبخزجبس‬‫مو‬‫اىششٗط‬‫ٗاحذا‬٘‫ري‬‫االخش‬‫اثزذأ‬ٍِ‫اىسطش‬ٌ‫سق‬1
‫ٗثَدشد‬‫رحقق‬‫احذ‬ٓ‫ٕز‬‫اىششٗط‬ٌ‫فسٞز‬‫رْفٞز‬‫خ٘اة‬‫اىششط‬‫اىخبص‬ٔ‫ث‬ٌ‫ث‬ٌ‫ٝز‬‫االّزقبه‬ٚ‫اى‬‫اىسطش‬
ٌ‫سق‬9‫ٍجبششا‬(ُٗ‫د‬‫اىَشٗس‬ٚ‫عي‬‫ثقٞخ‬‫اىششٗط‬ٜ‫اىز‬ٜ‫ري‬‫اىششط‬‫اىَزحقق‬).
ٍِ‫خاله‬‫اىَقبسّخ‬ِٞ‫ث‬‫خط٘اد‬ٌ‫اىَزشخ‬ّٔ‫فب‬‫ّالحظ‬ُ‫ا‬ً‫اسزخذا‬‫خَيخ‬else if‫ثذال‬ٍِ‫خَيخ‬if
‫اىجسٞطخ‬‫ٝ٘فش‬ٚ‫عي‬ٌ‫اىَزشخ‬‫اىعذٝذ‬ٍِ‫اىخط٘اد‬ٜ‫اىز‬ً٘‫سٞق‬‫ثٖب‬ٜ‫ف‬‫عَيٞخ‬‫اخزجبس‬‫ٍدَ٘عخ‬ٍِ
‫اىششٗط‬ً٘‫ٍعي‬‫ٍسجقب‬‫ثبّٖب‬ِ‫ى‬‫رزحقق‬
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬ 23
‫اكتب‬‫عذديي‬ ‫بقشاءة‬ ‫يقىم‬ ‫بشًاهج‬X,Y ))‫وكزلك‬‫حسابيت‬ ‫لعوليت‬ ‫سهز‬/(,*,-,)+‫ويقىم‬
‫الٌتيجت‬ ‫ويطبع‬ ‫العذديي‬ ‫علي‬ ‫العوليت‬ ‫بتطبيق‬.
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬ 24
‫اكتب‬‫بشًاهج‬‫يقشاء‬‫دسجاث‬‫طالب‬‫في‬‫ثالث‬‫اختباساث‬‫ثن‬‫يقىم‬‫بايجاد‬‫دسجت‬‫الطالب‬‫هي‬
‫خالل‬‫ايجاد‬‫هجوىع‬‫اعلى‬‫اختباسيي‬.
‫اكتب‬‫الشهش‬ ‫اسن‬ ‫بطباعت‬ ‫يقىم‬ ‫تن‬ ‫السٌت‬ ‫شهىس‬ ‫هي‬ ‫لشهش‬ ‫سقن‬ ‫بقشاءة‬ ‫يقىم‬ ‫بشًاهج‬.
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬
25
‫اننهايت‬
‫استماعكم‬ ‫لحسن‬ ‫شكر‬
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ‫ٍسع٘د‬ ٌ‫سبى‬
Salemaldrugi@gmail.com
Salemaldrugi@yahoo.com
26
‫اىَحبضش‬:ٜ‫اىذسٗق‬ ٌ‫سبى‬

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Lec4/nested if statements/ by :Salem_Adrugi