Third Lesson

  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Third Lesson as PDF for free.

More details

  • Words: 501
  • Pages: 9
Beginning With C# Programming Console Application

Third Lesson

.‫ا   أاع ا ت وأه ا‬ .(IF Statement) ‫ اط‬

.‫ "!   اط‬#$‫أ‬

By. Mohamed Farid

١

.‫ا   أاع ا ت وأه ا‬ ‫  ذا ا ؟‬



7  ‫م رة‬5:3 ‫; * ا‬5 < ‫( 'ص أي أ* "ى أي‬$ $)" *‫ أن )ف أ‬-. ‫رب‬1 23‫ ا‬4 ($ $)‫ ا‬56   ‫@ أ? " م >اء أو " م >اء ا‬A" ‫ أن‬5) B‫ إ‬3D ‫* إاء أي ت‬6F  B‫و‬ .HF)‫ وا‬2 <‫ إ ا‬2'6‫ع ا‬6‫ ا‬$ ‫ ا‬6 * $ I‫رب و‬1 23‫ ا‬4 * *G" 2F ‫ا ت‬

‫آ ا ؟‬



-:     Q  ‫)ف‬6J ‫ا ا)م‬K‫ ه‬6.*6$ 2L ‫رب‬1 23 ‫ص‬:‫ء ا‬M.  6J‫ل درا‬P; $ .( System ) F ‫ ا‬2L ‫ ( ا دة‬Convert )‫ دا اــ‬- ٢ ‫ع‬6‫ ا‬- ١ -:‫ ات‬4 ‫ع     ا‬6‫ام ا‬5:J‫ إ‬-:B‫أو‬ -:2‫ ا‬6‫(  ا‬Parse) F W) XY (.)‫ ـــ‬W) XY ‫ع‬6‫ام ا‬5:J> X<‫ إ ر‬7 < ‫ أن ل‬F  Z D Integer Var = Type.Parse(String Var) ; .(Integer) ‫ ع‬$ (y)  4 ‫( إ ا‬String) ‫ ع‬$ (x) 4 ‫ " ا‬-: ?‫ل  ذ‬# ‫وآ‬ string x; int y; x = Console.ReadLine(); y = int.Parse(x); Console.WriteLine(y / 2); By. Mohamed Farid

٢

.( System ) F ‫ ا‬2L ‫ ( ا دة‬Convert )‫ام دا اــ‬5:J‫ إ‬-:ً Y

  ‫ا  ل ا‬ string x; int y; x = Console.ReadLine(); y = Convert.ToInt16(x); Console.WriteLine(y / 2);

! "#$ %& (Convert)  ‫  ام ا ا‬ -:'

‫ ا‬# ‫*)( ا‬ ‫ ه أ  اء ا‬ -:‫ا  آ‬ (y/2)  #$ (x)  ‫ دل‬ *‫ إ‬,- (x) %& '&‫ ا‬#(  ‫و‬ 12 ‫( أي ر‬int) ‫ع‬/ 0& ,- 56& *78 ( #( 9‫ أ‬:;& %& .(string)< *‫أ‬

By. Mohamed Farid

٣

if ( ‫) ا> ط‬ { ‫;اب اط‬ }

.(IF Statement) ‫  ا> ط‬ ,‫ا ا@و‬

By. Mohamed Farid

٤

.(IF Statement) ‫  ا> ط‬ if ( ‫) ا> ط‬ { ‫;اب اط‬ }

A‫ا ا‬

else {

^3‫ اط ا‬L‫م "ا‬5 D 2L ‫ه‬K G6" 5 2‫ ا‬$‫ا_وا‬ }

By. Mohamed Farid

٥

if ( ١‫) ا> ط‬ { ١ ‫;اب اط‬ } else if ( 2 ‫)اط‬ { 2 ‫;اب اط‬ } else {

.(IF Statement) ‫  ا> ط‬

AA‫ا ا‬ ‫د‬C- F (else if ) ‫د‬C( 0D8 %6E ‫و‬ *G‫ و‬C8 ( ‫ا> وط ا‬ ‫ ا‬H

‫م‬5 D 2L ‫ه‬K G6" 5 2‫ ا‬$‫ا_وا‬ 3‫ آ اوط ا‬L‫"ا‬ }

By. Mohamed Farid

٦

: ‫ا! ^ ا_ول‬

. -!‫ ا‬5 " ‫ب‬3 IF ‫ام  اط‬5:J> `$ -‫أآ‬

By. Mohamed Farid

٧

. ‫م‬5:3  ‫ور‬$ ‫ )  آ‬IF ‫ام  اط‬5:J> `$ -‫أآ‬: '!  ‫ا‬

By. Mohamed Farid

23 ‫ا‬

٨

“With My Best Wishes & Regards”

Any Questions :Mohamed Farid Third Year [email protected] [email protected] By. Mohamed Farid

٩

Related Documents

Third Lesson
April 2020 0
Third
April 2020 27
Third
May 2020 31
Third
October 2019 36
Third Revision
November 2019 17
Story123 Third
May 2020 0