High level language Compiler Interpreter 1 0 Machine

  • Slides: 31
Download presentation

 ﻟﻐﺎﺕ ﺍﻟﺒﺮﻣﺠﺔ High level language ﺍﻟﻤﺘﺮﺟﻢ Compiler ﺍﻟﻤﻔﺴﺮ Interpreter (1 - 0) ﻟﻐﺔ

ﻟﻐﺎﺕ ﺍﻟﺒﺮﻣﺠﺔ High level language ﺍﻟﻤﺘﺮﺟﻢ Compiler ﺍﻟﻤﻔﺴﺮ Interpreter (1 - 0) ﻟﻐﺔ ﺍﻵﻠﺔ Machine language 1111001001101101

Solution: 1 - The question is: “How many girls attended the party? ” 2

Solution: 1 - The question is: “How many girls attended the party? ” 2 - Let x = the total number of students attending the party Let y = the number of boys attending the party Let z = the number of girls attending the party 3 - The given fact that 48 percent of the students are boys has no effect on the problem and may be discarded. 4 - The relationships stated are: a. 70 percent of the students attended ( x ) b. 60 percent of those attending were boys ( y ) c. This implies that the difference between x and y represents the number of girls attending (z). So, we express these relationships as the following equations: a. x = 1000 * 0. 70 b. y = x * 0. 60 c. z = x – y 5 - Since the variable x must be known to find the variable y and both x and y must be known in order to find z, the equations must be solved in the given order.

Flow Charts ﺧﺮﺍﺋﻂ ﺍﻟﺘﺪﻓﻖ ﺑﻄﺮﻳﻘﺔ Algorithm ﻫﻲ ﻋﺮﺽ ﻭﻛﺘﺎﺑﺔ ﺍﻟـ : • ﺧﺮﺍﺋﻂ ﺍﻟﺘﺪﻓﻖ

Flow Charts ﺧﺮﺍﺋﻂ ﺍﻟﺘﺪﻓﻖ ﺑﻄﺮﻳﻘﺔ Algorithm ﻫﻲ ﻋﺮﺽ ﻭﻛﺘﺎﺑﺔ ﺍﻟـ : • ﺧﺮﺍﺋﻂ ﺍﻟﺘﺪﻓﻖ . ﺗﺨﻄﻴﻄﻴﺔ ﺗﻌﺘﻤﺪ ﻋﻠﻰ ﺍﻟﺮﺳﻢ The flowchart is a mean of visually presenting the flow of data through an information processing systems • ﺧﺮﺍﺋﻂ ﺍﻟﺘﺪﻓﻖ ﻫﻲ ﺗﻤﺜﻴﻞ ﺑﻴﺎﻧﻲ ﻳﻌﺘﻤﺪ ﻋﻠﻰ ﺍﻟﺮﺳﻢ ﻟﺘﻮﺿﻴﺢ ﺗﺮﺗﻴﺐ . ﺍﻟﻌﻤﻠﻴﺎﺕ ﺍﻟﻼﺯﻣﺔ ﻟﺤﻞ ﻣﺴﺄﻠﺔ A flowchart is a diagrammatic representation that illustrates the sequence of operations to be performed to get the solution of a problem.

 ﻣﻤﻴﺰﺍﺕ ﺧﺮﺍﺋﻂ ﺍﻟﺘﺪﻓﻖ Advantages of Flow Charts Communication ﺍﻹﺗﺼﺎﻝ Effective analysis ﺗﺤﻠﻴﻞ ﺍﻷﻔﻌﺎﻝ

ﻣﻤﻴﺰﺍﺕ ﺧﺮﺍﺋﻂ ﺍﻟﺘﺪﻓﻖ Advantages of Flow Charts Communication ﺍﻹﺗﺼﺎﻝ Effective analysis ﺗﺤﻠﻴﻞ ﺍﻷﻔﻌﺎﻝ Proper documentation ﺗﻮﺛﻴﻖ ﺻﺤﻴﺢ Efficient coding ﺗﻜﻮﻳﺪ ﻛﻔﺀ Proper debugging ﺗﺼﺤﻴﺢ ﺍﻷﺨﻄﺎﺀ Efficient program ﻛﻔﺎﺀﺓ ﺇﺻﻼﺡ ﺍﻟﺒﺮﻧﺎﻣﺞ maintenance . 1. 2. 3. 4. 5. 6

 ﻋﻴﻮﺏ ﺧﺮﺍﺋﻂ ﺍﻟﺘﺪﻓﻖ Disadvantages of Flow Charts Complex logic ﺃﺴﻠﻮﺏ ﻣﻌﻘﺪ Alterations and

ﻋﻴﻮﺏ ﺧﺮﺍﺋﻂ ﺍﻟﺘﺪﻓﻖ Disadvantages of Flow Charts Complex logic ﺃﺴﻠﻮﺏ ﻣﻌﻘﺪ Alterations and modifications ﺇﺟﺮﺍﺀ ﺗﻌﺪﻳﻼﺕ Copying ﺍﻟﻨﺴﺦ More Details ﻛﺜﺮﺓ ﺍﻟﺘﻔﺎﺻﻴﻞ . 1. 2. 3. 4

 ﺭﻣﺰ ﻃﺮﻓﻲ Terminal ﺍﻟﻤﻔﺴﺮ Annotation Lamp doesn’t work ﺍﻟﻠﻤﺒﺔ ﻻ ﺗﻌﻤﻞ ﺧﻂ ﺍﺗﺠﺎﻩ

ﺭﻣﺰ ﻃﺮﻓﻲ Terminal ﺍﻟﻤﻔﺴﺮ Annotation Lamp doesn’t work ﺍﻟﻠﻤﺒﺔ ﻻ ﺗﻌﻤﻞ ﺧﻂ ﺍﺗﺠﺎﻩ Flow line ﺍﺧﺘﻴﺎﺭ / ﻗﺮﺍﺭ Decision Lamp Plugged in? NO Plug in lamp ﻫﻞ ﺍﻟﻠﻤﺒﺔ ﻓﻲ ﺍﻟﻔﻴﺸﺔ Yes Lamp burned out? NO Call electrician Yes Replace lamp ﻫﻞ ﺍﻟﻠﻤﺒﺔ ﻣﺤﺘﺮﻗﺔ

Start ﺇﺧﺮﺍﺝ / ﺇﺩﺧﺎﻝ Input / Output Read number 1 Read number 2 Is

Start ﺇﺧﺮﺍﺝ / ﺇﺩﺧﺎﻝ Input / Output Read number 1 Read number 2 Is number 2 = 0? Yes NO Result = number 1 / number 2 Output the result Print “Division is impossible” ﻋﻤﻠﻴﺔ Process End

Start Read A, B, C Yes Is B > C ? NO Is A

Start Read A, B, C Yes Is B > C ? NO Is A > B ? Yes Is A > C ? Yes NO NO Print C Print B End Print A