You are on page 1of 20

‫‪Compiler_x@yahoo.

com‬‬

‫ﻝ‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺍ‬

‫‪1‬‬

‫ﻢ‬
‫ﻴ‬
‫ﺣ‬
‫ﺮ‬
‫ﻟ‬
‫ﺍ‬
‫ﺮﲪﻦ‬
‫ﻟ‬
‫ﺍ‬
‫ﺍ‪‬‬
‫ﻢ‬
‫ﺑﺴ‬
‫ﻳﻦ‬
‫ﺮ‬
‫ﻫ‬
‫ﺎ‬
‫ﻟﻄ‬
‫ﻴﻦﺍ‬
‫ﺒ‬
‫ﻴ‬
‫ﻟﻄ‬
‫ﺍ‬
‫ﻪ‬
‫ﻟ‬
‫ﺍ‬
‫ّ‬
‫ﺪﻭ‬
‫ﻤ‬
‫ﺎﻣﺤ‬
‫ﻧ‬
‫ﺪ‬
‫ﻴ‬
‫ﻠﻰﺳ‬
‫ﻠﻰﺍﷲﻋ‬
‫ﻴﻦﻭﺻ‬
‫ﻤ‬
‫ﻟ‬
‫ﺎ‬
‫ﻌ‬
‫ﻟ‬
‫ﺍ‬
‫ﺪﷲﺭﺏ‬
‫ﻤ‬
‫ﻟﺤ‬
‫ﺍ‬

‫‪Functions‬‬

‫ﺔ ‪C++‬‬
‫ﻐ‬
‫ﻊ(ﻓﻲﻟ‬
‫ﺑ‬
‫ﺍ‬
‫ﻮ‬
‫ﺘ‬
‫ﻟ‬
‫ﺍ‬
‫ﻝ)‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺍ‬
‫ﺔ‪:‬‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ـ‬
‫ﻣ‬
‫ﺪ‬
‫ﻘ‬
‫ﻣ‬
‫ﺍﻥ‬
‫ﺎﻉ‬
‫ﺘﻄ‬
‫ﻤﺴ‬
‫ﻟ‬
‫ﺭﺍ‬
‫ﺪ‬
‫ﺮﺻﺖﻗ‬
‫ﺪﺣ‬
‫ﻗ‬
‫ﺔ ‪c++‬ﻭ‬
‫ﻐ‬
‫ﻝﻓﻲﻟ‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺍ‬
‫ﻢ‬
‫ﻠ‬
‫ﻌ‬
‫ﺘ‬
‫ﺔﻟ‬
‫ﻳ‬
‫ﺍ‬
‫ﺪ‬
‫ﻮﻥﺑ‬
‫ﻜ‬
‫ﻴ‬
‫ﻞﻟ‬
‫ﻔﺼ‬
‫ﻟ‬
‫ﺍ‬
‫ﺍ‬
‫ﺬ‬
‫ءﻫ‬
‫ﺎ‬
‫ﻬ‬
‫ﻧ‬
‫ﻢﺍ‬
‫ﻠﻰﺗ‬
‫ﻞﻭﻋ‬
‫ﻴﻖﻣﻦﺍﷲﺟ‬
‫ﻓ‬
‫ﻮ‬
‫ﺘ‬
‫ﺑ‬
‫ﺔ‬
‫ﻠ‬
‫ﺜ‬
‫ﻣ‬
‫ﻻ‬
‫ﺍ‬
‫ﺔ‬
‫ﺎﻃ‬
‫ﺑﺴ‬
‫ﺮﺡﻭ‬
‫ﻠﺸ‬
‫ﻴﻂﻟ‬
‫ﺒﺴ‬
‫ﻟ‬
‫ﺍ‬
‫ﻮﺏ‬
‫ﻠ‬
‫ﻻﺳ‬
‫ﻝﺍ‬
‫ﻪﻣﻦﺧﻼ‬
‫ﺘﻼﺣﻈ‬
‫ﺎﺳ‬
‫ﺍﻣ‬
‫ﺬ‬
‫ﻫ‬
‫ﺎﺕﻭ‬
‫ﻳ‬
‫ﻮ‬
‫ﺘ‬
‫ﻤﺴ‬
‫ﻟ‬
‫ﺍ‬
‫ﻞ‬
‫ﻞﻛ‬
‫ﺒ‬
‫ﺎﻣﻦﻗ‬
‫ﻣ‬
‫ﻮ‬
‫ﻬ‬
‫ﻔ‬
‫ﻣ‬
‫ﺎﻭ‬
‫ﻴﻄ‬
‫ﻮﻥﺑﺴ‬
‫ﻜ‬
‫ﻳ‬
‫ﺎ‬
‫ﻬ‬
‫ﻌ‬
‫ﻞﻣ‬
‫ﻣ‬
‫ﺎ‬
‫ﻌ‬
‫ﺘ‬
‫ﻟ‬
‫ﺍ‬
‫ﺮﻕ‬
‫ﻝﻭﻃ‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺎﺕﺍ‬
‫ﺋ‬
‫ﺎ‬
‫ﺪﻋ‬
‫ﺘ‬
‫ﺍﺳ‬
‫ﺔﻭ‬
‫ﺑ‬
‫ﺎ‬
‫ﺘ‬
‫ﺮﻕﻛ‬
‫ﺮﺽﻟﻄ‬
‫ﻌ‬
‫ﻜﻦﻳ‬
‫ﻟ‬
‫ﺔﻭ‬
‫ﻘ‬
‫ﻴ‬
‫ﻤ‬
‫ﻌ‬
‫ﻟ‬
‫ﺍ‬
‫ﺔ‬
‫ﻣﺠ‬
‫ﺮ‬
‫ﺒ‬
‫ﻟ‬
‫ﺭﺍ‬
‫ﺎ‬
‫ﻜ‬
‫ﻓ‬
‫ﻝﺍ‬
‫ﻭ‬
‫ﺎ‬
‫ﻨ‬
‫ﺘ‬
‫ﻳ‬
‫ﻮﻻ‬
‫ﻬ‬
‫ﺔﻓ‬
‫ﻮﻋ‬
‫ﻮﺿ‬
‫ﻤ‬
‫ﻟ‬
‫ﺍ‬
‫ﻝ‪.‬‬
‫ﺎ‬
‫ﻤﺠ‬
‫ﻟ‬
‫ﺍ‬
‫ﺍ‬
‫ﺬ‬
‫ﺔﻓﻲﻫ‬
‫ﻴ‬
‫ﻠ‬
‫ﻝﻋ‬
‫ﻮ‬
‫ﻟﺤﺼ‬
‫ﻌﺖﺍ‬
‫ﺘﻄ‬
‫ﺍﺳ‬
‫ﺎ‬
‫ﻞﻣ‬
‫ﻛ‬
‫ﺎﻭ‬
‫ﻬ‬
‫ﻨ‬
‫ﺔﻣ‬
‫ﻳ‬
‫ﺎ‬
‫ﻐ‬
‫ﻟ‬
‫ﺍ‬
‫ﻭ‬
‫ﺎﻣﻦ‬
‫ﻬ‬
‫ﻴ‬
‫ﻠ‬
‫ﻌﺖﻋ‬
‫ﻠ‬
‫ﺍﻃ‬
‫ﺘﻲ‬
‫ﻟ‬
‫ﺍ‬
‫ﺭ‬
‫ﺩ‬
‫ﺎ‬
‫ﻤﺼ‬
‫ﻟ‬
‫ﻌﺾﺍ‬
‫ﺓﻣﻦﺑ‬
‫ﺪ‬
‫ﻤ‬
‫ﺘ‬
‫ﺮﺡﻣﺴ‬
‫ﻟﺸ‬
‫ﺍ‬
‫ﺎﻓﻲ‬
‫ﻬ‬
‫ﻴ‬
‫ﻠ‬
‫ﺪﺕﻋ‬
‫ﻨ‬
‫ﺘ‬
‫ﺘﻲﺍﺳ‬
‫ﻟ‬
‫ﺍ‬
‫ﺗﻲ‬
‫ﺎ‬
‫ﻣ‬
‫ﻮ‬
‫ﻠ‬
‫ﻌ‬
‫ﻢﻣ‬
‫ﻌﻈ‬
‫ﻧﺖﻣ‬
‫ﺎ‬
‫ﺪﻛ‬
‫ﻘ‬
‫ﻢﻓ‬
‫ﻜ‬
‫ﻴ‬
‫ﻔ‬
‫ﻻﺍﺧ‬
‫ﻞ‬
‫ﻣ‬
‫ﺎ‬
‫ﻌ‬
‫ﺘ‬
‫ﻠ‬
‫ﻤﻲﻟ‬
‫ﻠ‬
‫ﻌ‬
‫ﺔﺗ‬
‫ﻳ‬
‫ﺍ‬
‫ﺪ‬
‫ﻴﺚﻓﻲﺑ‬
‫ﻊ ‪www.cplusplis.com‬ﺣ‬
‫ﻗ‬
‫ﻮ‬
‫ﻤ‬
‫ﺩﻟ‬
‫ﻮ‬
‫ﻌ‬
‫ﺮﻳ‬
‫ﺒ‬
‫ﻛ‬
‫ﻻ‬
‫ﺍ‬
‫ﻞ‬
‫ﻔﻀ‬
‫ﻟ‬
‫ﺍ‬
‫ﻜﻦ‬
‫ﺔﻟ‬
‫ﻌ‬
‫ﻣ‬
‫ﺎ‬
‫ﻟﺠ‬
‫ﻪﻣﻦﺍ‬
‫ﺘ‬
‫ﻤ‬
‫ﻠ‬
‫ﻌ‬
‫ﺗ‬
‫ﺎ‬
‫ﻣ‬
‫ﺎﻙﻭ‬
‫ﻨ‬
‫ﻫ‬
‫ﺎﻭ‬
‫ﻨ‬
‫ﻫ‬
‫ﻌﺖ‬
‫ﺪﻭﺿ‬
‫ﻗ‬
‫ﺰﻭ‬
‫ﻴ‬
‫ﻤ‬
‫ﻤ‬
‫ﻟ‬
‫ﻊﺍ‬
‫ﻗ‬
‫ﻮ‬
‫ﻤ‬
‫ﻟ‬
‫ﺍ‬
‫ﺍ‬
‫ﺬ‬
‫ﺎﻫ‬
‫ﻬ‬
‫ﻨ‬
‫ﻣ‬
‫ﺔﻭ‬
‫ﻴ‬
‫ﺒ‬
‫ﻨ‬
‫ﻻﺟ‬
‫ﺭﺍ‬
‫ﺩ‬
‫ﺎ‬
‫ﻤﺼ‬
‫ﻟ‬
‫ﺍ‬
‫ﻟﻰ‬
‫ﺍ‬
‫ء‬
‫ﻮ‬
‫ﻠﺠ‬
‫ﻟ‬
‫ﺍ‬
‫ﺭﺕ‬
‫ﺮ‬
‫ﺍﻗ‬
‫ﺬ‬
‫ﺒﺴﻂﻟ‬
‫ﺮﺡﻣ‬
‫ﺭﻟﺸ‬
‫ﺪ‬
‫ﺪﻣﺼ‬
‫ﺍﺟ‬
‫ﻢ‬
‫ﻝﻟ‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺍ‬
‫ﻊ‬
‫ﻣ‬
‫ﺎ‪.‬‬
‫ﻬ‬
‫ﺘ‬
‫ﻴ‬
‫ﻟ‬
‫ﻮ‬
‫ﻤ‬
‫ﺎﻭﺷ‬
‫ﻬ‬
‫ﺘ‬
‫ﺎﻃ‬
‫ﺒﺴ‬
‫ﻪﻟ‬
‫ﻴ‬
‫ﺔﻓ‬
‫ﻮﻋ‬
‫ﻮﺿ‬
‫ﻤ‬
‫ﻟ‬
‫ﺔﺍ‬
‫ﻠ‬
‫ﺜ‬
‫ﻣ‬
‫ﻻ‬
‫ﻔﺲﺍ‬
‫ﻧ‬
‫ﺎﻥ‬
‫ﻝﻛ‬
‫ﺎ‬
‫ﺓﻓﻲﺣ‬
‫ء‬
‫ﺍ‬
‫ﺮ‬
‫ﻘ‬
‫ﻟ‬
‫ﺍ‬
‫ﺓ‬
‫ﺩ‬
‫ﺎ‬
‫ﺍﻋ‬
‫ﻞﻭ‬
‫ﻠﺴ‬
‫ﺘﺴ‬
‫ﻞﻣ‬
‫ﻜ‬
‫ﺔﺑﺸ‬
‫ﻳ‬
‫ﺎ‬
‫ﻬ‬
‫ﻨ‬
‫ﻟ‬
‫ﺍ‬
‫ﻟﻰ‬
‫ﺍ‬
‫ﺔ‬
‫ﻳ‬
‫ﺍ‬
‫ﺪ‬
‫ﺒ‬
‫ﻟ‬
‫ﻩﻣﻦﺍ‬
‫ﺍ‬
‫ﺮ‬
‫ﻘ‬
‫ﺍﻥﺗ‬
‫ﻞ‬
‫ﻔﺼ‬
‫ﻟ‬
‫ﺍﺍ‬
‫ﺬ‬
‫ﻬ‬
‫ﺗﻚﻟ‬
‫ء‬
‫ﺍ‬
‫ﺮ‬
‫ﺪﻗ‬
‫ﻨ‬
‫ﺘﻲﻟﻚﻋ‬
‫ﻴﺤ‬
‫ﻧﺼ‬
‫ﻭ‬
‫ﺎ‪.‬‬
‫ﻮﻉﻣ‬
‫ﻮﺿ‬
‫ﻮﺽﻓﻲﻣ‬
‫ﻤ‬
‫ﻐ‬
‫ﻟ‬
‫ﺎﻙﺷﺊﻣﻦﺍ‬
‫ﻨ‬
‫ﻫ‬
‫ﺔ‬
‫ﺒ‬
‫ﺎﺣ‬
‫ﺮﺻ‬
‫ﻴ‬
‫ﻟﻰﻏ‬
‫ﺍ‬
‫ﺓ‬
‫ﺩ‬
‫ﺎ‬
‫ﻨ‬
‫ﻭﺍﺳ‬
‫ﺍ‬
‫ﻤﻰ‬
‫ﺃﻱﻣﺴ‬
‫ﻩﺗﺤﺖ‬
‫ﺮ‬
‫ﻢﻧﺸ‬
‫ﺘ‬
‫ﻳ‬
‫ﻮﺍﻥﻻ‬
‫ءﻫ‬
‫ﺍ‬
‫ﺮ‬
‫ﻘ‬
‫ﻟ‬
‫ﺍ‬
‫ﻪﻣﻦ‬
‫ﻠ‬
‫ﻣ‬
‫ﺎﺍ‬
‫ّ‬
‫ﻣ‬

‫ﻮﺳﻲ‬
‫ﺮﻃ‬
‫ﻔ‬
‫ﻟ‬
‫ﻝﻣﺤﺴﻦﺍ‬
‫ﻮ‬
‫ﺮﺳ‬
‫ﻟ‬
‫ﺍ‬
‫ﺪ‬
‫ﺒ‬
‫ﻨﻰﻋ‬
‫ﺜ‬
‫ﻣ‬
‫ﺔ‬
‫ﻌ‬
‫ﻣ‬
‫ﺎ‬
‫ﻟﺠ‬
‫ﺍ‬
‫ﺮﺏ‬
‫ﻌ‬
‫ﻟ‬
‫ﺔﺷﻂﺍ‬
‫ﻴ‬
‫ﻠ‬
‫ﻛ‬
‫ﺎﺕ‬
‫ﺒ‬
‫ﺎﺳ‬
‫ﻟﺤ‬
‫ﺍ‬
‫ﻡ‬
‫ﻮ‬
‫ﻠ‬
‫ﻢﻋ‬
‫ﻗﺴ‬
‫‪2006‬‬
‫‪Compiler_x@ yahoo.com‬‬

‫‪Compiler_x@yahoo.com‬‬

‫ﻝ‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺍ‬

‫‪2‬‬

‫ﺮﺱ‬
‫ﻬ‬
‫ﻔ‬
‫ﻟ‬
‫ﺍ‬
‫ﻝ ‪3 .............................................................................................. functions‬‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺍ‬
‫ﺔ ‪9 ...................................................................... void‬‬
‫ﻴ‬
‫ﺎﺳ‬
‫ﻴ‬
‫ﻘ‬
‫ﻟ‬
‫ﺍ‬
‫ﺍﻉ‬
‫ﻮ‬
‫ﻧ‬
‫ﻻ‬
‫ﺔﻣﻦﺍ‬
‫ﻴ‬
‫ﻟ‬
‫ﺎ‬
‫ﻟﺨ‬
‫ﺍ‬
‫ﻝ‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺍ‬
‫ﺍﺕ ‪10 ............................................................. scope of variable‬‬
‫ﺮ‬
‫ﻴ‬
‫ﻐ‬
‫ﺘ‬
‫ﻤ‬
‫ﻟ‬
‫ﺍ‬
‫ﻝ(‬
‫ﺎ‬
‫ﻭﻣﺠ‬
‫ﺍ‬
‫ﺪﻯ)‬
‫ﻣ‬
‫ﺔ ‪Passed by value and reference‬‬
‫ﻤ‬
‫ﻴ‬
‫ﻘ‬
‫ﻟ‬
‫ﺍ‬
‫ﻊﻭ‬
‫ﺮﺟ‬
‫ﻤ‬
‫ﻟ‬
‫ﺍ‬
‫ﺔ‬
‫ﺍﺳﻄ‬
‫ﻮ‬
‫ﻝﺑ‬
‫ﺎ‬
‫ﺭﺳ‬
‫ﻻ‬
‫ﺍ‬

‫‪11 ..............................‬‬

‫ﺍﺕ ‪13 ...................................... Default values of parameters‬‬
‫ﺮ‬
‫ﺘ‬
‫ﻣ‬
‫ﺍ‬
‫ﺭ‬
‫ﺎ‬
‫ﺒ‬
‫ﻠ‬
‫ﺔﻟ‬
‫ﻴ‬
‫ﺍﺿ‬
‫ﺮ‬
‫ﺘ‬
‫ﻓ‬
‫ﻻ‬
‫ﻢﺍ‬
‫ﻴ‬
‫ﻘ‬
‫ﻟ‬
‫ﺍ‬
‫ﻝ ‪14 .......................................................... Overloaded functions‬‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺍ‬
‫ﻞ‬
‫ﻴ‬
‫ﻤ‬
‫ﺓﺗﺤ‬
‫ﺩ‬
‫ﺎ‬
‫ﻳ‬
‫ﺯ‬
‫ﺔ ‪15 ............................................................. Recursive functions‬‬
‫ﻠ‬
‫ﺍﺧ‬
‫ﺪ‬
‫ﺘ‬
‫ﻤ‬
‫ﻟ‬
‫ﺍ‬
‫ﻝ‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺍ‬
‫ﻝ ) ‪Declaring functions(prototype‬‬
‫ﺍ‬
‫ﻭ‬
‫ﺪ‬
‫ﻟ‬
‫ﺍ‬
‫ﻳﺢﻋﻦ‬
‫ﺮ‬
‫ﺘﺼ‬
‫ﻟ‬
‫ﺍ‬

‫‪17 .....................................‬‬

‬‬ ‫‪.‬‬ ‫‪."ﺧﻄ‬ ‫‪.‬‬ ‫‪.."ﺧﻄ‬ ‫‪.‬‬ ‫‪.‬‬ ‫ﻝﺧ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﻠﺖﺍ‬ ‫ﺩﺧ‬ ‫ﺪﺍ‬ ‫ﻘ‬ ‫ﺎﻟ‬ ‫ﺓ )"ﺧﻄ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣﺞﻋ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻊﺍ‬ ‫ﺒ‬ ‫ﻴﻄ‬ ‫ﺮﻑﺳ‬ ‫ﻭﺣ‬ ‫ﺍ‬ ‫ﺰ‬ ‫ﻣ‬ ‫ﻮﻥﺭ‬ ‫ﻜ‬ ‫ﺗ‬ ‫ﺔ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﺍ‬ ‫ﻔﺲ‬ ‫ﻨ‬ ‫ﻝﺑ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﻻ‬ ‫ﺍﺍ‬ ‫ﺬ‬ ‫ﻴﻖﻫ‬ ‫ﻗ‬ ‫ﺪ‬ ‫ﺎﺗ‬ ‫ﻨ‬ ‫ﻮﺏﻣ‬ ‫ﻠ‬ ‫ﻤﻄ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺮﻭ‬ ‫ﺍﺧ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻗ‬ ‫ﻞﺭ‬ ‫ﺪﺧ‬ ‫ﺍﻥﻧ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘﺠ‬ ‫ﺍﺣ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻯﻓﻲ‬ ‫ﺍﺧ‬ ‫ﺔ‬ ‫ﻠ‬ ‫ﺮﺣ‬ ‫ﺪﻣ‬ ‫ﻨ‬ ‫ﻭﻋ‬ ‫ﻩ‬ ‫ﺮ‬ ‫ﺎﻃﺊ"(ﻣ‬ ‫ﻝﺧ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﻠﺖﺍ‬ ‫ﺩﺧ‬ ‫ﺪﺍ‬ ‫ﻘ‬ ‫ﺎﻟ‬ ‫ﺓ )"ﺧﻄ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﺎﻛ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻢﻋ‬ ‫ﺘ‬ ‫ﺘﺤ‬ ‫ﻴ‬ ‫ﺎﺳ‬ ‫ﻨ‬ ‫ﺎﻫ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﻴﺲﺣ‬ ‫ﻟ‬ ‫َﻭ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻗ‬ ‫ﻮﻥﺭ‬ ‫ﻜ‬ ‫ﺍﻥﻳ‬ ‫ﺮﻁ‬ ‫ﺃﻱﺷ‬ ‫ﻩ‬ ‫ﺍﻋﻼ‬ ‫ﻤﻼ؟ ‪.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪3‬‬ ‫ﻝ ‪: functions‬‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ؟ ‪:‬‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻫﻲ‬ ‫ﻣ‬ ‫ﺔ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻤﻦﺟﺴ‬ ‫ﻴﺲ ﺿ‬ ‫ﻪﻟ‬ ‫ﻌ‬ ‫ﻗ‬ ‫ﻮ‬ ‫ﻮﻥﻣ‬ ‫ﻜ‬ ‫ﻊﻳ‬ ‫ﻘﻄ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻜﻦﻫ‬ ‫ﻴﻦﻟ‬ ‫ﻌ‬ ‫ﻞﻣ‬ ‫ﻤ‬ ‫ﺩﻱﻋ‬ ‫ﺆ‬ ‫ﻣﺠﻲﻳ‬ ‫ﺮ‬ ‫ﻊﺑ‬ ‫ﻘﻄ‬ ‫ﻪﻫﻲﻣ‬ ‫ﺎﻃ‬ ‫ﻞﺑﺴ‬ ‫ﻜ‬ ‫ﺑ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ؟‬ ‫ﻬ‬ ‫ﻣ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺍﻧﺴ‬ ‫ﺫ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻮﻟ‬ ‫ﻫ‬ ‫ﻩﻭ‬ ‫ﺮ‬ ‫ﺎﺷ‬ ‫ﺒ‬ ‫ﻨﻚﻣ‬ ‫ﻫ‬ ‫ﻟﻰﺫ‬ ‫ﺍ‬ ‫ﺰ‬ ‫ﻔ‬ ‫ﻘ‬ ‫ﻴ‬ ‫ًﺳ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﺆ‬ ‫ﺍﻥﺳ‬ ‫ﺪ‬ ‫ﻘ‬ ‫ﺘ‬ ‫ﺍﻋ‬ ‫ـ ))(‪( main‬ﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﺭﺝﺟﺴ‬ ‫ﺎ‬ ‫ﺎﺧ‬ ‫ﻤ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺔ‪:‬‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺏ‬ ‫ﺒ‬ ‫ﺍﻟﻼﺳ‬ ‫ﺭ‬ ‫ﻮ‬ ‫ﺒﻚﻓ‬ ‫ﻴ‬ ‫ﺍﺟ‬ ‫ﻮﻑ‬ ‫ﻭﺳ‬ ‫ﺓ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻪﺍ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻞﻛ‬ ‫ﻴ‬ ‫ﻬ‬ ‫ﺘﺴ‬ ‫‪-1‬ﻟ‬ ‫ء‬ ‫ﺎ‬ ‫ﻻﺧﻄ‬ ‫ﺍ‬ ‫ﻊ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺔﺗ‬ ‫ﻟ‬ ‫ﻮ‬ ‫ﻬ‬ ‫‪ -2‬ﺳ‬ ‫ﻣﻼ‬ ‫ﺎ‬ ‫ﻣﺞﻛ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﺓﻛ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﺍﻋ‬ ‫ﻟﻰ‬ ‫ﺔﺍ‬ ‫ﺎﺟ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻭﻥ‬ ‫ﻣﺞﻣﻦﺩ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﺮﻋ‬ ‫ﻳ‬ ‫ﻮ‬ ‫ﺘﻄ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﻭ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﻮ‬ ‫ﻬ‬ ‫‪ -3‬ﺳ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﻣﺞ ﺻ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﻞﺣﺠ‬ ‫ﻌ‬ ‫‪-4‬ﻟﺠ‬ ‫ﺔ‬ ‫ﻠﺴ‬ ‫ﻪﻭﺳ‬ ‫ﻠ‬ ‫ﻬ‬ ‫ﻣﺞﺳ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻞﻛ‬ ‫ﻌ‬ ‫ﺪﻓﻲﺟ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﺮﻋﻲ(ﺗ‬ ‫ﻣﺞﻓ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺎﺑ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﻜﻦﺗﺴ‬ ‫ﻤ‬ ‫ﻭﻳ‬ ‫ﺍ‬ ‫ﺔ)‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺘﺼ‬ ‫ﺎﺧ‬ ‫ﻟﻚ‪:‬ﺑ‬ ‫ﻠﻰﺫ‬ ‫ﻴﻒﻋ‬ ‫ﺄﺿ‬ ‫ﻭﺳ‬ ‫ﺓ‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﺔﻭ‬ ‫ﺛ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺮﺣ‬ ‫ﺜ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻨﺖﻗ‬ ‫ﻜ‬ ‫ﺍﺏﻟ‬ ‫ﻮ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﻴﺖﺑ‬ ‫ﻔ‬ ‫ﺘ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﻧﻚﻟ‬ ‫ﻟﻚ‪٬‬ﻻ‬ ‫ﺪﺫ‬ ‫ﻘ‬ ‫ﺘ‬ ‫ﺍﻋ‬ ‫ﺎ؟‪٬‬ﻻ‪.‬‬ ‫ﺊ"<<‪cout‬‬ ‫ﺎﻃ‬ ‫ﻝﺧ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﻠﺖﺍ‬ ‫ﺩﺧ‬ ‫ﺪﺍ‬ ‫ﻘ‬ ‫ﺎﻟ‬ ‫.‬‬ ‫ﺊ"<<‪cout‬‬ ‫ﺎﻃ‬ ‫ﻝﺧ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﻠﺖﺍ‬ ‫ﺩﺧ‬ ‫ﺪﺍ‬ ‫ﻘ‬ ‫ﺎﻟ‬ ‫.‬‬ ‫ﺊ"<<‪cout‬‬ ‫ﺎﻃ‬ ‫ﻝﺧ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﻠﺖﺍ‬ ‫ﺩﺧ‬ ‫ﺪﺍ‬ ‫ﻘ‬ ‫ﺎﻟ‬ ‫.‬‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﻩﺍ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﺎﺑ‬ ‫ﻤ‬ ‫ﻞﺣﺠ‬ ‫ﻗ‬ ‫ﺍ‬ ‫ﺓﻭ‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﺔﻭ‬ ‫ﺛ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻭﺣ‬ ‫ﺍﺏ‪:‬‬ ‫ﻮ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﺒﻚﺑ‬ ‫ﻴ‬ ‫ﺄﺟ‬ ‫ﻭﺳ‬ ‫ﺄﻥ‬ ‫ﻪﻛ‬ ‫ﺌ‬ ‫ﺎﻃ‬ ‫ﺔﺧ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻝﻗ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﺎ‬ ‫ﻡﺑ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﻤﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻡ‬ ‫ﺎ‬ ‫ﺍﻗ‬ ‫ﺫ‬ ‫ﺬﺍ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻠ‬ ‫ﺮﺣ‬ ‫ﻓﻲﻣ‬ ‫ﻴﻦﻭ‬ ‫ﻌ‬ ‫ﻢﻣ‬ ‫ﻗ‬ ‫ﺃﺭ‬ ‫ﺮ‬ ‫ﻘ‬ ‫ﺜﻼﺍﻥﻧ‬ ‫ﺎﺝﻣ‬ ‫ﺘ‬ ‫ﺓﻧﺤ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻣﺠ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻌﺾﺑ‬ ‫ﻓﻲﺑ‬ ‫ﺎﻃﺊ "( ‪....‬ﻻ‬ ‫ﻬ‬ ‫ﻨ‬ ‫ﺮﺽﻣ‬ ‫ﻐ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝﻭ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻨﻰ‬ ‫ﻌ‬ ‫ﺍﺏﻋﻦﻣ‬ ‫ﻮ‬ ‫ﻟﺠ‬ ‫ﺎ‬ ‫ﺍﺑ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﻴﺖﺑ‬ ‫ﻔ‬ ‫ﺘ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻫ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﻮ‬ ‫ﻬ‬ ‫ﺮﺳ‬ ‫ﺜ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﻣﺠﻚ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﻮﻥﺑ‬ ‫ﻜ‬ ‫ﻴ‬ ‫ﻴﻒﺳ‬ ‫ﺔﻛ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺩﻣ‬ ‫ﻮ‬ ‫ﺗ‬ ‫ﻟﻲﻭ‬ ‫ﻮ‬ ‫ﻨﻚﺷﺨﺺﻓﻀ‬ ‫ﻜ‬ ‫ﻪ‪٬‬ﻟ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﺓﺑ‬ ‫ء‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻟﻰﻗ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺎﺟ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻭﻥ‬ ‫ﺪ‬ ‫ﺎﺏﺑ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻘﺖ‬ ‫ﻠ‬ ‫ﻏ‬ ‫ﺔ‪.‬‬ ‫‪.‪return 0‬‬ ‫}‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻡﺍ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺎﺳ‬ ‫ﻜﻦﺑ‬ ‫ﻟ‬ ‫ﺑﻖﻭ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻔﺲﺍ‬ ‫ﻧ‬ .‫‪Compiler_x@yahoo.‬‬ ‫.‬‬ ‫‪."ﺧﻄ‬ ‫‪.‬‬ ‫‪.++‬‬ ‫ﻘﻂ ‪:‬‬ ‫ﻴﺢﻓ‬ ‫ﻮﺿ‬ ‫ﺘ‬ ‫ﻠ‬ ‫ﻴﻦﻟ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻣﺞﻓﻲ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻜ‬ ‫ﻴﻚﺷ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻡ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﻭﻥﺍﺳ‬ ‫ﺪ‬ ‫ﻣﺞﺑ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫)(‪Int main‬‬ ‫{‬ ‫‪.‬‬ ‫ﺍﻣ‬ ‫ﺬ‬ ‫ﻴﺲﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‪٬‬‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻟﻰﻧ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻜ‬ ‫ﻫ‬ ‫ﺔﻭ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺓﺛ‬ ‫ﺮ‬ ‫ﺎﻣ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﺎﻛ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻢﻋ‬ ‫ﺘ‬ ‫ﺘﺤ‬ ‫ﻴ‬ ‫ﻟﺚﺳ‬ ‫ﺎ‬ ‫ﻢﺛ‬ ‫ﻗ‬ ‫ﻪﺭ‬ ‫ﺋ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺎﻗ‬ ‫ﻧ‬ ‫ﺩ‬ ‫ﺭ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﻟ‬ ‫ﺮﻯﻭ‬ ‫ﺍﺧ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﺭﺝﺟﺴ‬ ‫ﺎ‬ ‫ﺓﺧ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﺓﻭ‬ ‫ﺮ‬ ‫ﺓﻣ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺘﺐﻫ‬ ‫ﻜ‬ ‫ﺍﻥﻧ‬ ‫ﻫﻲ‬ ‫ﺔﻭ‬ ‫ﻠ‬ ‫ﻜ‬ ‫ﻤﺸ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻞﻫ‬ ‫ﻪﻟﺤ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ّ‬ ‫ﻊ‬ ‫ﻮﺿ‬ ‫ﺓﺑ‬ ‫ﺭ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻠﺖﻣﺸ‬ ‫ﻔﻀ‬ ‫ﺔﺳﻲ ‪++‬ﺗ‬ ‫ﻐ‬ ‫ﻟ‬ ‫ﺔ‬ ‫ﻐ‬ ‫ﺎﻟ‬ ‫ﺍﻳ‬ ‫ﺮ‬ ‫ﻜ‬ ‫؟ﺷ‬ ‫ً؟‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﺋ‬ ‫ﺍ‬ ‫ﺍﺭ‬ ‫ﺬ‬ ‫ﻴﺲﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺕ‪٬‬‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺩﻣﻦ‬ ‫ﺪ‬ ‫ﺮﻣﺤ‬ ‫ﻴ‬ ‫ﺩﻏ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺎﻭ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺎﺍ‬ ‫ﻨ‬ ‫ﺘﺠ‬ ‫ﺍﺣ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﺎﻛ‬ ‫ﻫ‬ ‫ﺬ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﺎﻟ‬ ‫ﻬ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻧ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺳﻲ‪.

‬‬ ‫ﻘ‬ ‫ﺎﻓ‬ ‫ﻬ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺔﻧ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘﺠ‬ ‫ﺍﺣ‬ ‫‪.‬‬ ‫ﺔﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻠﻰﺍ‬ ‫ﺮﻋ‬ ‫ﻴ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ .‬‬ ‫‪.‬‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺮﺳ‬ ‫ﻟ‬ ‫ﻔﺲﺍ‬ ‫ﻨ‬ ‫ﺓﻟ‬ ‫ﺭ‬ ‫ﺮ‬ ‫ﻜ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺎﺍ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﺮﻋ‬ ‫ﻓ‬ ‫ﻮ‬ ‫ﻴ‬ ‫ﺪﺳ‬ ‫ﻴ‬ ‫ﻛ‬ ‫ﺍ‬ ‫‪٬‬‬ ‫ﻴﻦ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﺮﻕﻓﻲﺍ‬ ‫ﻔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﻻﺣﻈﺖ‬ ‫ﻫ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﺓﻣﻦﻛ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﺪﻓ‬ ‫ﻌ‬ ‫ﺎﺑ‬ ‫ﻨ‬ ‫ﻳ‬ ‫ﺍ‬ ‫ﻮﺭ‬ ‫ﻠ‬ ‫ﺔﻓ‬ ‫ﺮﻋ‬ ‫ﺔﻭﺳ‬ ‫ﺎﻃ‬ ‫ﺑﺴ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﻮ‬ ‫ﻬ‬ ‫ﻞﺳ‬ ‫ﻜ‬ ‫ﻣﺞﺑ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﻞﻋ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﻊﺍ‬ ‫ﻴ‬ ‫ﺘﻄ‬ ‫ﻧﻚﺗﺴ‬ ‫ﺍ‬ ‫ﻟﻚ‬ ‫ﻟﻰﺫ‬ ‫ﺍ‬ ‫ﺍﺿﻒ‬ ‫ﻞ‬ ‫ﻓﻀ‬ ‫ﻻ‬ ‫ﻪﻣﻦﺍ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﻴﻦﻭ‬ ‫ﻌ‬ ‫ﺎﻣ‬ ‫ﺎﺧﻄ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﺍﻥﻓ‬ ‫ﻭ‬ ‫ﺜﻼﺍ‬ ‫ﺔﻣ‬ ‫ﻣﻀ‬ ‫ﺎ‬ ‫ﺓﻏ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﺎﻃﺊ"(ﻋ‬ ‫ﻝﺧ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﻠﺖﺍ‬ ‫ﺩﺧ‬ ‫ﺪﺍ‬ ‫ﻘ‬ ‫ﺎﻟ‬ ‫ﺪ )"ﺧﻄ‬ ‫ﻗﺼ‬ ‫ﺍ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺮﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺍﻥﻫ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﻮﺗ‬ ‫ﻪﻫ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﺎ‬ ‫ﺎﺳ‬ ‫ﻞﻣ‬ ‫ﻜ‬ ‫ﻢ"(ﻓ‬ ‫ﻗ‬ ‫ﻞﺭ‬ ‫ﺩﺧ‬ ‫ﺍ‬ ‫ﺎﻃﺊ‪٬‬‬ ‫ﻝﺧ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﺜﻼ)"ﺍ‬ ‫ﻮﻥﻣ‬ ‫ﻜ‬ ‫ﺘ‬ ‫ﺎﻟ‬ ‫ﻴﻄ‬ ‫ﻳﻼﺑﺴ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﺎﺗ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﺮﻱﻋ‬ ‫ﺍﺟ‬ ‫ﻭ‬ ‫ﺎﺍ‬ ‫ﻬ‬ ‫ﻟ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺍﻥ‬ ‫ﻭﻥ‬ ‫ﺪ‬ ‫ﻮﺏﺑ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﺎﻥﻣ‬ ‫ﺎﻛ‬ ‫ﻨ‬ ‫ﻣﺠ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺍﻥﺑ‬ ‫ﻻﻥ‬ ‫ﻞﺍ‬ ‫ﻴ‬ ‫ﺔ‪٬‬ﺗﺨ‬ ‫ﺎﻃ‬ ‫ﻞﺑﺴ‬ ‫ﻜ‬ ‫ﻮﺏﺑ‬ ‫ﻠ‬ ‫ﻤﻄ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻘ‬ ‫ﻘ‬ ‫ﻟﻚﺣ‬ ‫ﺬ‬ ‫ﺑ‬ ‫ﻘﻂﻭ‬ ‫ﺔﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓﻓﻲ‬ ‫ﺩ‬ ‫ﻮ‬ ‫ﻮﺟ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺮﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻟﺨﻄ‬ ‫ﻴﺢﺍ‬ ‫ﻭﺗﺼﺤ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺎﺍ‬ ‫ﻧ‬ ‫ﺩ‬ ‫ﺭ‬ ‫ﺍ‬ ‫ﻪﻭ‬ ‫ﻴ‬ ‫ﺎﻓ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘﺠ‬ ‫ﺍﺣ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺎﻥﻓﻲﺍ‬ ‫ﻜ‬ ‫ﻞﻣ‬ ‫ﺎﻓﻲﻛ‬ ‫ﻫ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺎﻛ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺃﻱ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻩﺍ‬ ‫ﺬ‬ ‫ﻡﻫ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺍﺳ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻥ‬ ‫ﻮﻛ‬ ‫ﺎﻟ‬ ‫ﻮﺻ‬ ‫ﻠﻲﺧﺼ‬ ‫ﻤ‬ ‫ﺮﻋ‬ ‫ﻴ‬ ‫ﺍﺷﺊﻏ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﻣﺞﻭ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺓﻓﻲﻛ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺒﺤﺚﻋﻦﻫ‬ ‫ﻟ‬ ‫ﺎﺍ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻮﺟﺐﻋ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﺎﻓﺴ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﺩﻓ‬ ‫ﻮ‬ ‫ﻮﺟ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‪.‬‬ ‫ﻂ‪.‪return 0‬‬ ‫}‬ ‫ﻘﻂ ‪.‬‬ ‫ﻘﻂ‬ ‫ﺎﻓ‬ ‫ﻬ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺔﻧ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘﺠ‬ ‫ﺍﺣ‬ ‫‪.‬‬ ‫ﻃﺊ"<<‪cout‬‬ ‫ﺎ‬ ‫ﻝﺧ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﺍ‬ ‫ﻠﺖ‬ ‫ﺩﺧ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻘ‬ ‫ﺎﻟ‬ ‫"ﺧﻄ‬ ‫ﻘﻂ‬ ‫ﺎﻓ‬ ‫ﻬ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺔﻧ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘﺠ‬ ‫ﺍﺣ‬ ‫‪.‬‬ ‫‪.‬‬ ‫.‫‪Compiler_x@yahoo.‬‬ ‫.‬‬ ‫‪.‬‬ ‫ﻘﻂ‬ ‫ﺎﻓ‬ ‫ﻬ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺔﻧ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘﺠ‬ ‫ﺍﺣ‬ ‫‪.‪return 0‬‬ ‫}‬ ‫ﺔ‪.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪4‬‬ ‫)(‪int main‬‬ ‫{‬ ‫‪.‬‬ ‫‪.‬‬ ‫‪.‬‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻠﻰﻫ‬ ‫ﺪﺍﷲﻋ‬ ‫ﻤ‬ ‫ﻨﺤ‬ ‫ﻠ‬ ‫ﺜﻼ‪٬‬ﻓ‬ ‫ﺮﻣ‬ ‫ﻻﻑﺳﻄ‬ ‫ﺓﺍ‬ ‫ﺮ‬ ‫ﻮﻥﻣﻦﻋﺸ‬ ‫ﻜ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﻢ "<<‪cout‬‬ ‫ﻗ‬ ‫ﻞﺭ‬ ‫ﺩﺧ‬ ‫ﺎﻃﺊ‪٬‬ﺍ‬ ‫ﻝﺧ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫"ﺍ‬ ‫)(‪int main‬‬ ‫{‬ ‫‪.‬‬ ‫ﻘﻂ‬ ‫ﺎﻓ‬ ‫ﻬ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺔﻧ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘﺠ‬ ‫ﺍﺣ‬ ‫‪.‬‬ ‫‪.

‪statement 3‬‬ ‫‪.‪statement 1‬‬ ‫.par‬‬ ‫‪a‬‬ ‫‪me‬‬ ‫‪t‬‬ ‫‪e‬‬ ‫‪r‬‬ ‫‪2‬‬ ‫‪.‪statement 2‬‬ ‫.‬‬ ‫‪.‬‬ ‫‪.‬‬ ‫)‬ ‫{‬ ‫.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪5‬‬ ‫ﺎﺏ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻓﻲ‬ ‫ﺜ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﻡ‬ ‫ﺪ‬ ‫ﻘ‬ ‫ﺘ‬ ‫ﺎﻧ‬ ‫ﻣ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﺮﻋ‬ ‫ﺜ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﺓ‬ ‫ﺮ‬ ‫ﻜ‬ ‫ﻔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺘﻀﺢﻫ‬ ‫ﻮﻑﺗ‬ ‫ﻝ‪٬‬ﻭﺳ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻨﻰﺍ‬ ‫ﻌ‬ ‫ﺔﻋﻦﻣ‬ ‫ﻴﻄ‬ ‫ﻮﺑﺴ‬ ‫ﻟ‬ ‫ﺓﻭ‬ ‫ﺮ‬ ‫ﻜ‬ ‫ﺬﺕﻓ‬ ‫ﻻﻥﺍﺧ‬ ‫ﺍ‬ ‫ﻧﻚ‬ ‫ﺪﺍ‬ ‫ﻘ‬ ‫ﺘ‬ ‫ﺍﻋ‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺕ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻜ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﻘﻂ‬ ‫ﻴﺤﻲﻓ‬ ‫ﻮﺿ‬ ‫ﻝﺗ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﺩﻣ‬ ‫ﺮ‬ ‫ﻮﻣﺠ‬ ‫ﺑﻖﻫ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﺓ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻻﺷ‬ ‫ﻊﺍ‬ ‫ﺔ ‪.‬ﻣ‬ ‫ﻠ‬ ‫ﺜ‬ ‫ﻣ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺎﻣﻦﺧﻼ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ءﺍﷲﻭ‬ ‫ﺎ‬ ‫ﻧﺸ‬ ‫ﺍ‬ ‫ﺎ‪.‫‪Compiler_x@yahoo.….‬‬ ‫‪return value‬‬ ‫}‬ ‫ﺍﻥ ‪:‬‬ ‫ﻴﺚ‬ ‫ﺣ‬ ‫ﻟﺦ‬ ‫ﻭ ‪.. void‬ﺍ‬ ‫ﺍ‬ ‫ﻭ ‪long‬‬ ‫ﻭ ‪float‬ﺍ‬ ‫ﻮﻥ ‪int‬ﺍ‬ ‫ﻜ‬ ‫ﺎﻥﻳ‬ ‫ﺔﻛ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻪﺍ‬ ‫ﺩﺑ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﺬﻱﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻧﻲ‬ ‫ﺎ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﻮﺍ‬ ‫‪: Type‬ﻫ‬ ‫ﺔﺳﻲ‬ ‫ﻐ‬ ‫ﻠ‬ ‫ﺓﻟ‬ ‫ﺯ‬ ‫ﻮ‬ ‫ﺮﻣﺤﺠ‬ ‫ﻴ‬ ‫ﺔﻏ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻮﻥﻛ‬ ‫ﻜ‬ ‫ﺮﻁﺍﻥﻳ‬ ‫ﺔﺷ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﻪﻋ‬ ‫ﻘ‬ ‫ﻠ‬ ‫ﻨﻄ‬ ‫ﺬﻱﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻻﺳ‬ ‫ﻟﻰﺍ‬ ‫ﺮﺍ‬ ‫ﻴ‬ ‫ﻪﻳﺸ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺍﺿﺢ‬ ‫‪: Function_name‬ﻭ‬ ‫ﺔ‪.‬‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﺘﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺍﻋ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻊﻟ‬ ‫ﺎﺿ‬ ‫‪++‬ﻭﺧ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺎﺟ‬ ‫ﻴ‬ ‫ﺘ‬ ‫ﺍﺣ‬ ‫ﺍﺕﺣﺴﺐ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺩﻣﻦﺍ‬ ‫ﺪ‬ ‫ﺮﻣﺤ‬ ‫ﻴ‬ ‫ﺩﻏ‬ ‫ﺪ‬ ‫ﻞﻋ‬ ‫ﺮﺳ‬ ‫ﺍﻥﻧ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﻳ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺭﺳ‬ ‫ﺪﺍ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﺬﻱﻧ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮ‬ ‫‪: Parameter‬ﻫ‬ ‫ﺃﻱ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻞﺃﻱﺑ‬ ‫ﺮﺳ‬ ‫ﺎﺍﻥﻻﻧ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﻳ‬ ‫ﺔ (ﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﺏﻣﻦ‬ ‫ﻠ‬ ‫ﻤﻄ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺬﺍ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺎﻓﻲﺗ‬ ‫ﻧ‬ ‫ﺪ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﺍﺕﺗ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺍﺕﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻫ‬ ‫)‬ ‫ﺔ‪.‬‬ ‫ﻳ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻴ‬ ‫ﺘ‬ ‫ﺍﺧ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺎ(‬ ‫ﻘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﻪﺳ‬ ‫ﻨ‬ ‫ﺗﻚﻋ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﺍﺧ‬ ‫ﺬﻱ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺠﻲ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻊ‬ ‫ﻘﻄ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﺃﻱﻫﻲﻋ‬ ‫ﺔ)‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻮﻥﺍ‬ ‫ﻜ‬ ‫ﺘﻲﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻤ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺍﺕﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻌ‬ ‫ﻟ‬ ‫‪: Statement‬ﻫﻲﺍ‬ .‬‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻝﻓ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻡ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺍﺳ‬ ‫ﻊ‬ ‫ﻴ‬ ‫ﺘﻄ‬ ‫ﺎ (ﺗﺴ‬ ‫ﻫ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻭﻏ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟﺠ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﻭﻣ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻴ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺔ )ﺣﺴ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻞﻋ‬ ‫ﻜ‬ ‫ﺮﻓ‬ ‫ﻴ‬ ‫ﺜ‬ ‫ﻜ‬ ‫ﻞﺑ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﺮﺳ‬ ‫ﻟ‬ ‫ﺪﻯﺍ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻬﻲﺗ‬ ‫ﻓ‬ ‫ء‬ ‫ﺎ‬ ‫ﻴ‬ ‫ﺍﺷ‬ ‫ﺓ‬ ‫ﺪ‬ ‫ﻠﻰﻋ‬ ‫ﻔﻖﻋ‬ ‫ﺘ‬ ‫ﻨ‬ ‫ﺔﻟ‬ ‫ﻳ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺑ‬ ‫ﻠﻰ‬ ‫ﺔﻋ‬ ‫ﻟ‬ ‫ﻻ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻪﻟ‬ ‫ﻔ‬ ‫ﻠ‬ ‫ﺘ‬ ‫ﻤﺨ‬ ‫ﻟ‬ ‫ﺎﺕﺍ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻌﺾﻣﻦ‬ ‫ﻡﺑ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺪﺍﺳ‬ ‫ﻨﻲﻗ‬ ‫ﻧ‬ ‫ﺄ‬ ‫ﺮﻯﻓ‬ ‫ﻻﺧ‬ ‫ﺭﺍ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻤﺼ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻣﻦ‬ ‫ﻬ‬ ‫ﺋ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺘﻲﻗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺕ‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﺘﺴ‬ ‫ﻟ‬ ‫ﻮﻉﻓﻲﺍ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻠ‬ ‫‪-1‬ﻟ‬ ‫ﺎﺕ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓ‬ ‫ﺬ‬ ‫ﻣﻦﻫ‬ ‫ﺪﻭ‬ ‫ﺍﺣ‬ ‫ﺷﺊﻭ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﻟﻰﺷﺊﻭ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻞ(ﺗﺸ‬ ‫ﺋ‬ ‫ﻻ‬ ‫ﻭﺩ‬ ‫ﻪﺍ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻭﻣ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺑ‬ ‫‪) ‬‬ ‫ﻴﺲ‬ ‫ﻟ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺔﺭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝﺩ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻻﺻﺢﺍﻥﻧ‬ ‫ﺍﻥﺍ‬ ‫ﺔ‬ ‫ﻘ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻓﻲ‬ ‫ﻭ‬ ‫ﺪ)‬ ‫ﺍﺣ‬ ‫ﺎﺷﺊﻭ‬ ‫ﻤ‬ ‫ﺔﻫ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﻴﺴﻲﺍ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫‪‬ﺍ‬ ‫ﻝ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻨ‬ ‫ﺮﻓ‬ ‫ﻣ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﻠﻂ‬ ‫ﺘ‬ ‫ﺘﻰﻻﻳﺨ‬ ‫ﻜﻦﺣ‬ ‫ﻟ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓﻋﻦﺩ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻮﻋ‬ ‫ﺎﺱﻫ‬ ‫ﻻﺳ‬ ‫ﺔﺳﻲ‪++‬ﻓﻲﺍ‬ ‫ﻐ‬ ‫ﻣﺞﻓﻲﻟ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻴﺴﻲﻻﻥﺍ‬ ‫ﺋ‬ ‫ﻣﺞﺭ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺑ‬ ‫ﻴﺴﻲ(‬ ‫ﺋ‬ ‫ﻣﺞﺭ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺑ‬ ‫ﻧﻲ‬ ‫ﺮﻻ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻛ‬ ‫ﺔ)‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻡﻛ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﻮﻑﺍﺳ‬ ‫ﻮ ‪compiler‬ﻭﺳ‬ ‫ﻫ‬ ‫ﺪﻭ‬ ‫ﺍﺣ‬ ‫ﻟﻰﺷﺊﻭ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻢﺗﺸ‬ ‫ﺮﺟ‬ ‫ﺘ‬ ‫ﻭﻣ‬ ‫ﺮﻑﺍ‬ ‫ﻭﻣﺼ‬ ‫ﺮﺍ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫‪‬ﻛ‬ ‫ﺎ(‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﺩﺕﻋ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﺗ‬ ‫ﺘﻼﻑ‬ ‫ﺍﺧ‬ ‫ﻟﻰ‬ ‫ﺩﺍ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﻟﻚﻳ‬ ‫ﺫ‬ ‫ﺔﻭ‬ ‫ﻴﺤ‬ ‫ﻧﺖ ﺻﺤ‬ ‫ﺎ‬ ‫ﺍﻥﻛ‬ ‫ﺬﻭ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﻣﺞﻻﺗ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻌﺾ‬ ‫ﺍﻥﺑ‬ ‫ﻭ‬ ‫ﻣﺞﺍ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻌﺾ‬ ‫ءﻓﻲﺑ‬ ‫ﺎ‬ ‫ﺓﺍﺧﻄ‬ ‫ﺪ‬ ‫ﺮﻋ‬ ‫ﻬ‬ ‫ﺪﺗﻈ‬ ‫‪-2‬ﻗ‬ ‫ﺔﺳﻲ ‪++‬‬ ‫ﻐ‬ ‫ﻣﺞﻟ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﻨﺴﺦﻣﻦﺑ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺎﻓﻲﻛ‬ ‫ﻨ‬ ‫ﻘ‬ ‫ﻓ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﻨﻚﻻ‬ ‫ﻫ‬ ‫ﻘﻰﻓﻲﺫ‬ ‫ﺒ‬ ‫ﺍﻥﺗ‬ ‫ﺍﻳﺠﺐ‬ ‫ﺪ‬ ‫ﺔﺟ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﺔﻣ‬ ‫ﻩﻣﻼﺣﻈ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﺎﻭ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﻘﻂﻓﻲﺍﺳ‬ ‫ﺓﻓ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﺔﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺪﻗ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺔﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﺩ‬ ‫‪-3‬ﻛ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻘ‬ ‫ﻝﺗ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻲ"‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻡ‬ ‫ﻜﻼ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻻﻥﻓﻲ "‬ ‫ﺃﺍ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﺔﻟ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻐ‬ ‫ﻴ‬ ‫ﻟﺼ‬ ‫ﺍ‬ ‫‪Type function_name (parameter1.

‪return z‬‬ ‫}‬ ‫‪2‬‬ ‫)(‪int main‬‬ ‫{‬ ‫.c‬‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﺔﺑ‬ ‫ﻮﻋ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺔ =‪3+5‬ﻣ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺎﻋ‬ ‫ﺒ‬ ‫ﻡﺑﻄ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺮ ‪9‬ﻳ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺬﻫ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻤﺖﺑ‬ ‫ﻮﻗ‬ ‫ﻞﻟ‬ ‫ﻴﺤﺼ‬ ‫ﺬﻱﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﺮﻑﻣ‬ ‫ﻌ‬ ‫ﻨ‬ ‫ﺎﺳ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﻴﻼﻻ‬ ‫ﻠ‬ ‫ﺮﺧﻲﻗ‬ ‫ﺘ‬ ‫ﺍﻥﺗﺴ‬ ‫ﺪﻙ‬ ‫ﻳ‬ ‫ﺭ‬ ‫ﺍ‬ ‫ﻻﻥ‬ ‫ﺍ‬ ‫ﺗﻲ‬ ‫ﻻ‬ ‫ﻨﻚﺍ‬ ‫ﻫ‬ ‫ﻊﻓﻲﺫ‬ ‫ﺔﺿ‬ ‫ﻳ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺑ‬ ‫ﺓ )(‪.‬‬ ‫ﻻﺧ‬ ‫ﺩﺍ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻦ ‪.‪int c‬‬ ‫. iostram.c‬‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺎﺍ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺪﻗ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﻮﻕﻭﺳ‬ ‫ﺎﻓ‬ ‫ﻫ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﺘﻲﻋ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻊ‬ ‫ﻤ‬ ‫ﻟﺠ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ءﺩ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺮ ‪8‬ﻳ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺮ‪.z‬‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺎﻓﻲﺍ‬ ‫ﻬ‬ ‫ﻌ‬ ‫ﻳﻀ‬ ‫ﻊ ‪y‬ﻭ‬ ‫ﺔ ‪x‬ﻣ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻊﻗ‬ ‫ﻤ‬ ‫ﻡﺑﺠ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺮ ‪4‬ﻳ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﻳﻦ‪.int y‬‬ ‫{‬ ‫.h‬‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺝ‬ ‫ﺮ‬ ‫ﻻﺧ‬ ‫ﻝﻭﺍ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﻴﻦﻣ‬ ‫ﻤ‬ ‫ﺘﻀ‬ ‫ﺪﻟ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻢ ‪1‬ﻳ‬ ‫ﻗ‬ ‫ﺮﺭ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻳﻦﻫ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺎﺑ‬ ‫ﻬ‬ ‫ﻟ‬ ‫ﻢ ‪٬sum‬ﻭ‬ ‫ﻻﺳ‬ ‫ﻞﺍ‬ ‫ﻤ‬ ‫ﺗﺤ‬ ‫ﻴﺢ ‪٬int‬ﻭ‬ ‫ﻟﺼﺤ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺿﺢﻣﻦ‬ ‫ﺎﻭ‬ ‫ﻤ‬ ‫ﻫﻲﻛ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻒ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺔﺗ‬ ‫ﻳ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻮﺑ‬ ‫ﺮ ‪2‬ﻫ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﺗﻲﻋ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺎﺳ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﻻﻥﻻ‬ ‫ﺍﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﺜ‬ ‫ﺎﻛ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻟﻚﺑ‬ ‫ﺎ‬ ‫ﻞﺑ‬ ‫ﻐ‬ ‫ﻻﺗﺸ‬ ‫ﺎ‪٬‬ﻭ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﺩﺟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍﻥﺍ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻞﻗ‬ ‫ﻤ‬ ‫ﻮﻑﺗﺤ‬ ‫ﺍﺕﺳ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫‪x‬ﻭ ‪y‬ﻫ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺬﻗ‬ ‫ﺎﺧ‬ ‫ﺘ‬ ‫ﺎﻭ ‪y‬ﺳ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﺩﺟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻳﻦﺍ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺬﻗ‬ ‫ﺎﺧ‬ ‫ﻮﻑﻳ‬ ‫ﻢﺍﻥ ‪x‬ﺳ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﺍﻥﺗ‬ ‫ﻻﻥ‬ ‫ﺍ‬ ‫ﻨﻚ‬ ‫ﻩﻣ‬ ‫ﺪ‬ ‫ﻳ‬ ‫ﺭ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻞﻣ‬ ‫ﻛ‬ ‫ﻞﻭ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﺪﻗ‬ ‫ﻌ‬ ‫ﺎﺑ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻠ‬ ‫ﻴ‬ ‫ﻔﺼ‬ ‫ﺗ‬ ‫ﺮ‪.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪6‬‬ ‫ﺘﻲ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺎﺳ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺎﺗ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺔﻭ‬ ‫ﻴﺤ‬ ‫ﺓ ﺻﺤ‬ ‫ﺭ‬ ‫ﻮ‬ ‫ﺔﺑﺼ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﺪﻓﻲﺍ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻫﻲﺗ‬ ‫ﺔﺳﻲ‪++‬ﻭ‬ ‫ﻐ‬ ‫ﻠ‬ ‫ﺓﻟ‬ ‫ﺯ‬ ‫ﻮ‬ ‫ﺔﻣﺤﺠ‬ ‫ﻤ‬ ‫ﻠ‬ ‫‪: Return‬ﻫﻲﻛ‬ ‫ﺎ(‪.‬‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ﻤ‬ ‫ﻪﻣﺠ‬ ‫ﻴ‬ ‫ﻊﻓ‬ ‫ﻨﻀ‬ ‫ﻮﻉ ‪int‬ﻟ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ ‪c‬ﻣﻦ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻑ‬ ‫ﻌ‬ ‫ﺮ ‪7‬ﻳ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺮ‪. main‬‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﺬﻣﻦﻋ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﺔﺳﻲ‪++‬ﻳ‬ ‫ﻐ‬ ‫ﻠ‬ ‫ﻣﺞﺑ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﻞﺑ‬ ‫‪-1‬ﺍﻥﻛ‬ .‪return 0‬‬ ‫}‬ ‫‪3‬‬ ‫‪4‬‬ ‫‪5‬‬ ‫‪6‬‬ ‫‪7‬‬ ‫‪8‬‬ ‫‪9‬‬ ‫‪10‬‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻭﺍ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻡﻓﻲﺍ‬ ‫ﺎ‬ ‫ﻗ‬ ‫ﺭ‬ ‫ﻻ‬ ‫ﻩﺍ‬ ‫ﺬ‬ ‫ﺩﻫ‬ ‫ﻮ‬ ‫ﻮﺟ‬ ‫ﺎﺱﻟ‬ ‫ﻻﺍﺳ‬ ‫ﺮﺡﻭ‬ ‫ﻟﺸ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﻮ‬ ‫ﻬ‬ ‫ﻞﺳ‬ ‫ﺍﺟ‬ ‫ﻘﻂﻣﻦ‬ ‫ﺮﻓ‬ ‫ﻻﺳﻄ‬ ‫ﻢﺍ‬ ‫ﻴ‬ ‫ﻗ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻤﺖﺑ‬ ‫ﺪﻗ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺎﺳﻲ ‪.‫‪Compiler_x@yahoo.‪int z‬‬ ‫.5‬‬ ‫.‪z=x+y‬‬ ‫.‬‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ﻤ‬ ‫ﻪﻣﺠ‬ ‫ﻴ‬ ‫ﻊﻓ‬ ‫ﻨﻀ‬ ‫ﺬﻱﺳ‬ ‫ﻟ‬ ‫ﻮﻉ ‪int‬ﻭﺍ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ ‪z‬ﻣﻦ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﺮﻑﻣ‬ ‫ﻌ‬ ‫ﺮ ‪3‬ﻳ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺮ‪.‪cout<<" 3 + 5 = "<<c‬‬ ‫.h‬‬ ‫‪1‬‬ ‫)‪int sum (int x.‬‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻊ‬ ‫ﻤ‬ ‫ﺔﻣﻦﺟ‬ ‫ﺗﺠ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺔ ‪z‬ﺍ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺎﻗ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺪﺍ‬ ‫ﻨ‬ ‫ﻳﺴ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻬﻲﺍ‬ ‫ﻨ‬ ‫ﺮ ‪5‬ﻳ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻳ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟﻰﺑ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻮﻳﺸ‬ ‫ﻫ‬ ‫ﺮ ‪6‬ﻭ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﻳﻦ‪.)‪c=sum(3.‬‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﺎﺳ‬ ‫ﻘﻂﺑ‬ ‫ﺓﻓ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﺔﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺪﻗ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺔﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﺩ‬ ‫ﻛ‬ ‫ﺔ)‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤﻼﺣﻈ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻛ‬ ‫ﺬ‬ ‫ﻞﺗ‬ ‫ﺔﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﺍﺳ‬ ‫ﻟﻰ‬ ‫ﻫﻲ ‪value‬ﺍ‬ ‫ﺎﻭ‬ ‫ﻫ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﺑ‬ ‫ﻮﻥ‬ ‫ﻜ‬ ‫ﺍﻥﺗ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﺔﻳ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺎﻫ‬ ‫ﻨ‬ ‫ﻫ‬ ‫ﺎ‪٬‬ﻭ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﺎﺳ‬ ‫ﺓﺑ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﺔﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺪﻗ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺔﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﺩ‬ ‫ﺍﻥﻛ‬ ‫ﻴﺚ‬ ‫ﺔﺣ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻫ‬ ‫ﺪ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﺘﻲﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪:Value‬ﻫﻲ‬ ‫ﻝ‪type‬‬ ‫ﻮﻉﺍ‬ ‫ﻔﺲﻧ‬ ‫ﺃﻱﻣﻦﻧ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻪﺍ‬ ‫ﻴ‬ ‫ﻓﺖﻓ‬ ‫ﺮ‬ ‫ّ‬ ‫ﺬﻱﻋ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻧﻲ‬ ‫ﺎ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻮﻉﺍ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻔﺲ‬ ‫ﻮﻥﻣﻦﻧ‬ ‫ﻜ‬ ‫ﺍﻥﻳ‬ ‫ﺮﻁ‬ ‫ﻠﻰﺷ‬ ‫ﻢﻋ‬ ‫ﻗ‬ ‫ﻭﺭ‬ ‫ﺑﺖﺍ‬ ‫ﺎ‬ ‫ﻭﺛ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻞﺍﺳ‬ ‫ﺒ‬ ‫ﻗ‬ ‫ﻴﻦ‪:‬‬ ‫ﻴﺤ‬ ‫ﻳﻦ ﺻﺤ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻮﻉﻋ‬ ‫ﻤ‬ ‫ﺩﻣﺠ‬ ‫ﺎ‬ ‫ﻳﺠ‬ ‫ﺔﻻ‬ ‫ﻴﻄ‬ ‫ﺔﺑﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﺩ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻣﺞﻳﺴ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﻮﺑ‬ ‫ﻫ‬ ‫ﻝﻭ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻝﻋﻦﺍ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺄﺧ‬ ‫ﻨ‬ ‫ﻟ‬ ‫>‪# include <iostream.

y‬ﻭ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻊﻟ‬ ‫ﻤ‬ ‫ﺔﺟ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﺮ ‪4‬ﺑ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﻡ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻴ‬ ‫ﻳﻒ (ﺳ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺮﺗ‬ ‫ﺎﺳﻄ‬ ‫ﻨ‬ ‫ﻠ‬ ‫ﺎﻗ‬ ‫ﻤ‬ ‫ﻪﻛ‬ ‫ﻧ‬ ‫ﺮ ‪3‬ﻻ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﻴﺲ‬ ‫ﻟ‬ ‫ﻭ‬ ‫ﺮ‪)4‬‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﻡ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻴ‬ ‫ﺳ‬ ‫ﻮ‬ ‫ﻫ‬ ‫ﺔ ‪z‬ﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ءﻗ‬ ‫ﺎ‬ ‫ﻢﺍﻋﻄ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﺮ ‪( return z ) 5‬ﻓﺴ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺎﻓﻲ‬ ‫ﻣ‬ ‫ﻭﻱ ‪8‬ﻻﻥ )‪٬(8=5+3‬ﺍ‬ ‫ﺎ‬ ‫ﺬﻱﻳﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ ‪z‬ﻭ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻊﻟ‬ ‫ﻤ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﺗﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺔ)‪(8‬ﻫ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﺔ ‪sum‬ﻟ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺒﺤﺖﺍ‬ ‫ﺎﺻ‬ ‫ﺎﻓ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﺎﺳ‬ ‫ﺓﺑ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﺔﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺪﻗ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺔﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﺩ‬ ‫ﺍﻥﻛ‬ ‫ﻴﺚ‬ ‫ﺔ ‪sum‬ﻭﺣ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻌﻄﻰﻟ‬ ‫ﻴ‬ ‫ﻊﺳ‬ ‫ﻤ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﺗﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﻴﺖ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺬﻱ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻥ‬ ‫ﻜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻔﺲ‬ ‫ﻟﻰﻧ‬ ‫ﺍ‬ ‫ﻴﺴﻲﻭ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﺔﻋ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ءﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﻧ‬ ‫ﺪﺍ‬ ‫ﻌ‬ ‫ﺬﺑ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ ‪c‬ﻻﻥ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﻌﻄﻰ‬ ‫ﺘ‬ ‫ﺔﺳ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ )‪.‬‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﺔ ‪0‬ﻟ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﻳ‬ ‫ﻴﺴﻲﻭ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻬﻲ‬ ‫ﻨ‬ ‫ﺮ ‪10‬ﻳ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﻴﺚ‬ ‫ﻝﻣﻦﺣ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﺮﻟ‬ ‫ﺜ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﺎﺕ‬ ‫ﻴ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻜ‬ ‫ﻣ‬ ‫ﺮﺽﺍ‬ ‫ﻌ‬ ‫ﻪﻳ‬ ‫ﻨ‬ ‫ﻜ‬ ‫ﺑﻖﻟ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻪﻟ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﻮﻣﺸ‬ ‫ﻫ‬ ‫ﻝﻭ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻧﻲﻋﻦ‬ ‫ﺎ‬ ‫ﻝﺛ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻴﻚﻣ‬ ‫ﻟ‬ ‫ﺍ‬ .8‬‬ ‫ﺎ‬ ‫ﺒﺤﺖﺗﺴ‬ ‫ﺘﻲﺍﺻ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ ‪c‬ﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻮﻉﺑ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺍﺱﻣ‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﻻ‬ ‫ﻴﻦﺍ‬ ‫ﺩﺑ‬ ‫ﻮ‬ ‫ﻮﺟ‬ ‫ﺎﻣ‬ ‫ﻊﻣ‬ ‫ﺒ‬ ‫ﻴﻄ‬ ‫ﺮ ‪9‬ﺳ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺔ‪. y‬‬ ‫‪2‬‬ ‫ﻟﻲ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﻢﻋ‬ ‫ﺘ‬ ‫ﻢﻳ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺗ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ءﻟ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺳﻄ‬ ‫.‬‬ ‫ﻘ‬ ‫ﻠ‬ ‫ﺬﻣﻄ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻗﺖ‬ ‫ءﻭ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺛ‬ ‫ﻣﺞﺍ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‪8‬‬ ‫ﻗ‬ ‫ﺮﺭ‬ ‫ﻟﺴﻄ‬ ‫ﺎﻣﻦﺍ‬ ‫ﻨ‬ ‫ﻣﺠ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺍﺑ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﻨ‬ ‫ﺫﻥﺳ‬ ‫ﺍ‬ ‫ﻢﻣﻦ‬ ‫ﺘ‬ ‫ﺔﻳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ءﻻﻱﺩ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻞﺍﺳ‬ ‫ﺍﻥﻛ‬ ‫ﻴﺚ‬ ‫ﺎﺣ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﺎﺑ‬ ‫ﻨ‬ ‫ﻤ‬ ‫ﺘﻲﻗ‬ ‫ﻟ‬ ‫ﺔ ‪sum‬ﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ءﻟ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺓ )‪sum(3.5‬ﻭ‬ ‫ﺭ‬ ‫ﻮ‬ ‫ﻟﺼ‬ ‫ﺎ‬ ‫ﺔﺑ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺎﺍ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺎﺍﺳ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﺎﺍ‬ ‫ﻤ‬ ‫ﺜ‬ ‫ﻴ‬ ‫ﺔﻭﺣ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻻﺻ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﺲ‬ ‫ﻟ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻟﻰﺍ‬ ‫ﻞﺍ‬ ‫ﺮﺳ‬ ‫ﺘ‬ ‫ﺍﺕﺳ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻗ‬ ‫ﺍﻥ‬ ‫‪٬‬ﻻﺣﻆ‬ ‫ﻴﺐ‬ ‫ﺗ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﻟﻰ ‪y‬ﻋ‬ ‫ﺍ‬ ‫ﻌﻄﻰ‬ ‫ﺘ‬ ‫ﺭﻭﺳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺘ‬ ‫ﺔﻣﻦ ‪5‬ﺳ‬ ‫ﺎﻧﺴﺨ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺮ ‪x‬ﻭ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌﻄﻰﻟ‬ ‫ﺗ‬ ‫ﺭﻭ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺘ‬ ‫ﺔﻣﻦ ‪3‬ﺳ‬ ‫ﺍﻥﻧﺴﺨ‬ ‫ﻨﻲ‬ ‫ﻌ‬ ‫ﻳ‬ ‫ﻮ‬ ‫ﻫ‬ ‫ﺮﻭ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻧﻲﺑ‬ ‫ﺎ‬ ‫ﻟﻰﺛ‬ ‫ﺍ‬ ‫ﻧﻲ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﺮﺍ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺔﻭﺍ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻻﺻ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻓﻲ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻝﺑ‬ ‫ﻭ‬ ‫ﻟﻰﺍ‬ ‫ﻌﻄﻰﺍ‬ ‫ﻴ‬ ‫ءﺳ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻝﻋ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‪٬‬‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻳ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺮﺑ‬ ‫ﻢ ‪2‬ﺳﻄ‬ ‫ﻗ‬ ‫ﺮﺭ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻞﻋ‬ ‫ﻴﺤﺼ‬ ‫ﺬﻱﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻒ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺮﺗ‬ ‫ﺳﻄ‬ ‫) ‪int sum ( x . y‬‬ ‫‪8‬‬ ‫.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪7‬‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻫﻲﻋ‬ ‫ﻣﺞﻭ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻘﻂﻓﻲ‬ ‫ﺓﻓ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﺓﻭ‬ ‫ﺮ‬ ‫ﻪﻣ‬ ‫ﺎﺟ‬ ‫ﺘ‬ ‫ﻨﺤ‬ ‫ﺮﺳ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺜﻼ ‪int a‬ﻫ‬ ‫ﺮﻣ‬ ‫ﺜ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻪﻣ‬ ‫ﻴ‬ ‫ﺮﻑﻓ‬ ‫ﻌ‬ ‫ﺮﻳ‬ ‫ﻞﺳﻄ‬ ‫‪-2‬ﻛ‬ ‫ﻞ‬ ‫ﻤ‬ ‫ﻤﻦﻋ‬ ‫ﺮﺿ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻞﻫ‬ ‫ﺪﺧ‬ ‫ﻻﻳ‬ ‫ﺓﻭ‬ ‫ﺮ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪﻓﻲ‬ ‫ﺰﻟ‬ ‫ﻴ‬ ‫ﺰﺣ‬ ‫ﻢﺣﺠ‬ ‫ﺘ‬ ‫ﻜﻲﻳ‬ ‫ﻣﺞ ‪compiling‬ﻟ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﺮﺟ‬ ‫ﺔﺗ‬ ‫ﻠ‬ ‫ﺮﺣ‬ ‫ﻣ‬ ‫ﺎ‪.) ‪c=sum( 3 . 5‬‬ ‫‪8‬‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺔﺍﺳ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻴﻦﺟ‬ ‫ﺑ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻳﻒﺍ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺮﺗ‬ ‫ﻴﻦﺳﻄ‬ ‫ﻪﺑ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘﺸ‬ ‫ﻟ‬ ‫ﻻﺣﻆﺍ‬ ‫ﺔ‪. c=sum (3.5‬ﻫﻲﺍﺳ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪﺙﺍﻥ‬ ‫ﻴﺤ‬ ‫ﺬﻱﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔﻣﻦ‬ ‫ﺍﻥﻧﺴﺨ‬ ‫ﻠﻰ‬ ‫ﺪﻋ‬ ‫ﻛ‬ ‫ﻭ‬ ‫ﺍ‬ ‫ﺔﻭ‬ ‫ﻴﺚﺍﻥﻧﺴﺨ‬ ‫ﻢ ‪ 3. 5‬‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻔﺲﻗ‬ ‫ﻞﻧ‬ ‫ﻤ‬ ‫ﺮ ‪y‬ﻳﺤ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺔ ‪3‬ﻭﺍ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻔﺲﻗ‬ ‫ﻞﻧ‬ ‫ﻤ‬ ‫ﺮ ‪x‬ﻳﺤ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﻻﻥ‬ ‫ﺒﺢﺍ‬ ‫ﺍﺻ‬ ‫ﻴﺚ‬ ‫ﺎﺣ‬ ‫ﻬ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﺔﺑ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍﺍ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻫ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﺑ‬ ‫ﻌﻄﻲ‬ ‫ﻳ‬ ‫ﻳﻦ ‪x.‫‪Compiler_x@yahoo.5‬ﺣ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔﻫﻲ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺎﺑ‬ ‫ﻨ‬ ‫ﻫ‬ ‫ﺎﻭ‬ ‫ﻬ‬ ‫ﺗ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻊﺑ‬ ‫ﺔﻣ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﺮﺍﺳ‬ ‫ﻛ‬ ‫ﻝﺫ‬ ‫ﺧﻼ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﺓ )‪sum (3.) ‪c=sum ( 3 .5‬‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻪﺍ‬ ‫ﻴ‬ ‫ﻓ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺓﻣﻦﺍ‬ ‫ﺪ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫) ‪int sum ( x . 5‬‬ ‫ﻭﻱ ‪.

y=3.h‬‬ ‫)‪int subtraction (int a.‪r=a-b‬‬ ‫.)‪z= 4 + subtraction (x.2) << '\n‬‬ ‫ﻭﻥ‬ ‫ﺪ‬ ‫ﺓﺑ‬ ‫ﺮ‬ ‫ﺎﺷ‬ ‫ﺒ‬ ‫ﺍﺝ ‪cout‬ﻣ‬ ‫ﺮ‬ ‫ﻻﺧ‬ ‫ﺔﺍ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻟﻰﺟ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺎﺍ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻴﺚﺍﺳ‬ ‫ﻠﻒﺣ‬ ‫ﺘ‬ ‫ﺔﺗﺨ‬ ‫ﻐ‬ ‫ﻴ‬ ‫ﻟﺼ‬ ‫ﺍ‬ ‫ﻜﻦ‬ ‫ﻝﻟ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻴﺠ‬ ‫ﺘ‬ ‫ﻔﺲﻧ‬ ‫ﻪﻧ‬ ‫ﻟ‬ ‫ﺮ‪.‬‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻟﻰﺑ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻢﻫ‬ ‫ﻴ‬ ‫ﺮﻗ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻢﺗ‬ ‫ﺘ‬ ‫ﻳ‬ ‫ﻢﻭ‬ ‫ﻴ‬ ‫ﻞﻗ‬ ‫ﻤ‬ ‫ﺎﺗﺤ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻝﻻﻥﺍ‬ ‫ﻮ‬ ‫ﺒ‬ ‫ﻘ‬ ‫ﻣ‬ ‫ﺎﻭ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﺗ‬ ‫ﺔ‪:‬‬ ‫ﻌ‬ ‫ﺑ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﺎﺍ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﻭ‬ ‫.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪8‬‬ ‫ﺗﻲ‬ ‫ﻻ‬ ‫ﺎ‬ ‫ﻮﻥﻛ‬ ‫ﻜ‬ ‫ﺘ‬ ‫ﺋﺞﺳ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪The first result is 5‬‬ ‫‪The second result is 5‬‬ ‫‪The third result is 2‬‬ ‫‪The fourth result is 6‬‬ ‫‪// function example‬‬ ‫>‪#include <iostream.2‬‬ ‫. z‬‬ ‫.‫‪Compiler_x@yahoo.y) << '\n‬‬ ‫.'‪cout << "The first result is " << z << '\n‬‬ ‫ﺎ‪. b‬ﻭ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺮﺡﻗ‬ ‫ﺔﻟﻄ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻫﻲﺩ‬ ‫ﺎ ‪subtraction‬ﻭ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﺔﺍﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻓﻲﻫ‬ ‫ﻓﻲ‬ ‫ﺓ(ﻭ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻬ‬ ‫ﻟﺸ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻣﻼﺣﻈ‬ ‫ﺎ)‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﺎﺳ‬ ‫ﺓﺑ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﺔﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺪﻗ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺔﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﺮ‬ ‫ﻛ‬ ‫ﺬ‬ ‫ﺘ‬ ‫ﺍﻥﺗ‬ ‫ﺪﻙ‬ ‫ﻳ‬ ‫ﺭ‬ ‫ﺍ‬ ‫ﻻﻥ‬ ‫ﺍ‬ ‫ﻝ‪.2) << '\n‬‬ ‫.‬‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻟﻰﻣ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻫ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺍﺳ‬ ‫ﻟﻲ ‪:‬‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻣ‬ ‫ﺍ‬ ‫.)‪return (r‬‬ ‫}‬ ‫)( ‪int main‬‬ ‫{‬ ‫.'‪cout << "The second result is " << subtraction (7.y‬‬ ‫ﻞ‬ ‫ﻜ‬ ‫ﻟﺸ‬ ‫ﺎ‬ ‫ﺎﺑ‬ ‫ﻳﻀ‬ ‫ﺎﺍ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻊﻛ‬ ‫ﻴ‬ ‫ﺘﻄ‬ ‫ﻧﺴ‬ ‫ﻭ‬ ‫.'‪cout << "The third result is " << subtraction (x.'‪cout << "The fourth result is " << z << '\n‬‬ ‫.‪z= subtraction (x.2‬‬ ‫.‬‬ ‫ﻬ‬ ‫ﺮﺣ‬ ‫ﻩﺷ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﺍﻋﻲﻻﻋ‬ ‫ﻪﻻﺩ‬ ‫ﻧ‬ ‫ﺪﺍ‬ ‫ﻘ‬ ‫ﺘ‬ ‫ﺍﻋ‬ ‫ﺋﺖ‪.'‪cout << "The third result is " << subtraction (x.‬ﻭ‬ ‫ﺎ‬ ‫ﻔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻓﻲ‬ ‫ﻫ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺭﺳ‬ ‫ﺘﻲﺩ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﺍ‬ ‫ﻔﺲ‬ ‫ﺔﻧ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﻭ‬ ‫ﻟﻲ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫.‪int x=5.‪return 0‬‬ ‫}‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﺎﻫ‬ ‫ﻨ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﺎﻳ‬ ‫ﻣﻼﻻﻥﻣ‬ ‫ﺎ‬ ‫ﻣﺞﻛ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻠ‬ ‫ﺮﺡﻟ‬ ‫ﻟﺸ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻴ‬ ‫ﺎﺻ‬ ‫ﻔ‬ ‫ﻞﻓﻲﺗ‬ ‫ﺩﺧ‬ ‫ﻮﻑﻟﻦﺍ‬ ‫ﺳ‬ ‫ﺎﻥ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﻮﻟ‬ ‫ﻞﻫ‬ ‫ﻜ‬ ‫ﻝﻛ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺮﺽﻣﻦﻫ‬ ‫ﻐ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﻦ ‪a .)‪z = subtraction (7.y) << '\n‬‬ ‫ﻴﺢ‬ ‫ﺍﺷﺊ ﺻﺤ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﻭ‪2‬ﻭ‬ ‫ﺓ‪7‬‬ ‫ﺮ‬ ‫ﺎﺷ‬ ‫ﺒ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺪ‬ ‫ﻞ )‪( x.‬‬ ‫ﻫ‬ ‫ﺪ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺘﻲﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻝﺑ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺔﺗﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻝﺍﻥﺍ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻜﻦﺍﻥﻧ‬ ‫ﻤ‬ ‫ﻣﺞﻳ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺬﺍ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺔﺗ‬ ‫ﻠ‬ ‫ﺮﺣ‬ ‫ﻣ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺔﻟﻼﺳ‬ ‫ﻨ‬ ‫ﻜ‬ ‫ﻤ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻕ‬ ‫ﻟﻄ‬ ‫ﻴﻚﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻭ‬ ‫.'‪cout << "The second result is " << subtraction (7.y)+4‬‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻛ‬ ‫ﺎﻭ‬ ‫ﻬ‬ ‫ﺓﺑ‬ ‫ﺪ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻝﺑ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺔﺗﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺎﻻﻥﺍ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻴﺢﺗ‬ ‫ﺎﺷﺊ ﺻﺤ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﻫﻲ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺔﺣﺴ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻟﻰﻋ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﺎﺗ‬ ‫ﻨ‬ ‫ﻴﺚﻫ‬ ‫ﺣ‬ ‫ﻟﻲ‪:‬‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻜ‬ ‫ﻟﺸ‬ ‫ﺍ‬ ‫‪Z=4+2‬‬ ‫‪Z=2+4‬‬ .‬ﻭ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺔﻻﺳ‬ ‫ﻨ‬ ‫ﻜ‬ ‫ﻤ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻕ‬ ‫ﻟﻄ‬ ‫ﺍ‬ ‫ﺎ‪.'‪cout << "The first result is " << z << '\n‬‬ ‫. int b‬‬ ‫{‬ ‫.y‬ﺑ‬ ‫ﺜ‬ ‫ﺍﺕﻣ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻢﻣ‬ ‫ﻴ‬ ‫ﻟﻰﻗ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ءﺗ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﻮﺍﻥﺍ‬ ‫ﺎﻫ‬ ‫ﻨ‬ ‫ﺪﻫ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﻟﺸﺊ‬ ‫ﺎﻥﺍ‬ ‫ﻓ‬ ‫ﺔ‪.)‪z= 4 + subtraction (x.y‬‬ ‫.)‪z = subtraction (7.‪int r‬‬ ‫.

‪statement 3‬‬ ‫‪.….com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪9‬‬ ‫ﺔ ‪void‬‬ ‫ﻴ‬ ‫ﺎﺳ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻉ‬ ‫ﻮ‬ ‫ﻧ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﺔﻣﻦ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺨ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﺔﻟ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻐ‬ ‫ﻴ‬ ‫ﻟﺼ‬ ‫ﺮﺍ‬ ‫ﻛ‬ ‫ﺬ‬ ‫ﻨﺖﺗ‬ ‫ﻮﻛ‬ ‫ﻟ‬ ‫‪Ty‬‬ ‫‪pef‬‬ ‫‪unc‬‬ ‫‪t‬‬ ‫‪i‬‬ ‫‪o‬‬ ‫_‪n‬‬ ‫(‪name‬‬ ‫‪pa‬‬ ‫‪r‬‬ ‫‪a‬‬ ‫‪me‬‬ ‫‪t‬‬ ‫‪e‬‬ ‫‪r‬‬ ‫‪1‬‬ ‫‪.) ( ‪printmessage‬‬ ‫.‬‬ ‫‪.‬‬ ‫‪return value‬‬ ‫}‬ ‫؟‬ ‫؟‬ ‫ﺔ ‪.‪statement 2‬‬ ‫..)( ‪printmessage‬‬ ‫ﺍﺱ‪. return‬‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻻﻋ‬ ‫ﺔﺍ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﺩﻟﺠ‬ ‫ﻮ‬ ‫ﺎﻻﻭﺟ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫‪٬‬‬ ‫‪void‬‬ ‫ﺍﺱ‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﻻ‬ ‫ﻛﺖﺍ‬ ‫ﺮ‬ ‫ﺍﺗ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﻟ‬ ‫ﺍﺕ (ﻭ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺎﺕ )ﺑ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﺃﻱﻣ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻴﺲﻟ‬ ‫ﺔ ) (‪printmessage‬ﻟ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﻝ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻓﻲ‬ ‫ﻳﻀ‬ ‫ﻤﻼﺣﻆﺍ‬ ‫ﻟ‬ ‫ﻣﻦﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻴﺲﻟ‬ ‫ﺔﻟ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﺍﺱﺗﺸ‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﻴﻦ‬ ‫ﻴﺚ ‪void‬ﺑ‬ ‫ﻞ )‪void printmessage(void‬ﺣ‬ ‫ﻜ‬ ‫ﻟﺸ‬ ‫ﺎ‬ ‫ﺎﺑ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻜﻦﻛ‬ ‫ﻤ‬ ‫ﻭﻳ‬ ‫ﺔﺍ‬ ‫ﺭﻏ‬ ‫ﺎ‬ ‫ﻓ‬ ‫ﺍﺕ‪.‬‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺃﻱﻗ‬ ‫ﻞ‬ ‫ﻤ‬ ‫ﺗﺤ‬ ‫ﺎﻻ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﻘﻂﻻ‬ ‫ﺔﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﺮﺍﺳ‬ ‫ﻛ‬ ‫ﺬ‬ ‫ءﺑ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﻢﺍ‬ ‫ﺎﺗ‬ ‫ﻤ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺮﻭ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻟﻰﻣ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻢﻳﺴ‬ ‫ﺔﻟ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺍﻥ‬ ‫ﺎﻻﺣﻆ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ."!‪cout << "I'm a function‬‬ ‫}‬ ‫) ( ‪int main‬‬ ‫{‬ ‫.‬‬ ‫‪.‪statement 1‬‬ ‫.‬‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﻮ‬ ‫ﺪﻭﺟ‬ ‫ﺋ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﻩﻣﻦﻓ‬ ‫ﺪ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﻩﻓ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﺮﻭ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻴﺲﻟ‬ ‫ﻟ‬ ‫ﻪﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ءﻟ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﺍﺿﺢﺍﻥ‬ ‫ﻞﻭ‬ ‫ﻜ‬ ‫ﺍﺱﺑﺸ‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﻻ‬ ‫ﺮﺍ‬ ‫ﻴ‬ ‫ﺗﺸ‬ ‫ﻪ‪:‬‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻣ‬ ‫ﺍ‬ ‫.‬‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻟﻰﻣ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺩﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺔﻻﺳ‬ ‫ﺎﺟ‬ ‫ﺎﻙﺣ‬ ‫ﻨ‬ ‫ﻴﺲﻫ‬ ‫ﺍﻟ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﺍﺧ‬ ‫ﻭ‬ ‫ﻝ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻣ‬ ‫‪// void function example‬‬ ‫>‪#include <iostream..‪Printmessage‬‬ ‫ﺔ‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﻫ‬ ‫ﺍ‬ ‫ﻤﻦ‬ ‫ﻜ‬ ‫ﺎﺗ‬ ‫ﻨ‬ ‫ﻫ‬ ‫ﻪﻭ‬ ‫ﻨ‬ ‫ﻠﻦﻋ‬ ‫ﻌ‬ ‫ﻢﻳ‬ ‫ﺮﻟ‬ ‫ﺍﺧ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﺄﻱﻣ‬ ‫ﺮﻛ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﺎﻣ‬ ‫ﻫ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﻌ‬ ‫ﻴ‬ ‫ﺮﺳ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻴﺚﻫ‬ ‫ﻪ‪٬‬ﺣ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ءﺍ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻪﻻﺳ‬ ‫ﺌ‬ ‫ﺎﻃ‬ ‫ﺎﺧ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻓ‬ ‫ﺍﺱ‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﺔ‪.‫‪Compiler_x@yahoo.‪return 0‬‬ ‫}‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺮﻫ‬ ‫ﻬ‬ ‫ﺔ ‪printmessage‬ﺗﻈ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﺔ "‪"I'm a function‬ﺍﺳ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺎﻋ‬ ‫ﺒ‬ ‫ﺔﻟﻄ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰﺩ‬ ‫ﻮﻱﻋ‬ ‫ﺘ‬ ‫ﻟﻲﻳﺤ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﻧﻲﻫ‬ ‫ﺎ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍﻥﺍ‬ ‫‪٬‬ﻻﺣﻆ‬ ‫ﻴﺴﻲ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﺍﺧ‬ ‫ﺔﺩ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻩﺍ‬ ‫ﺬ‬ ‫ﺎﻫ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﺪﻋﻲﻓ‬ ‫ﺘ‬ ‫ﺓﻧﺴ‬ ‫ﺮ‬ ‫ﻞﻣ‬ ‫ﺬﻓﻲﻛ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺎﺷ‬ ‫ﻠﻰﺷ‬ ‫ﺓﻋ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓ ‪.‬‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻌ‬ ‫ﻪﻻﻳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﺎﺕﻟ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﺩﻣ‬ ‫ﻮ‬ ‫ﻡﻭﺟ‬ ‫ﺪ‬ ‫ﺍﺱ ) (‪٬‬ﻋ‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﻴﻦﺍ‬ ‫ﺎﺑ‬ ‫ﻬ‬ ‫ﺗ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﺎﻕﻣ‬ ‫ﻓ‬ ‫ﺭ‬ ‫ﺍ‬ ‫ﺎﻭ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﻪﺍﺳ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﻮﺑ‬ ‫ﻪﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻱﺩ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺍﻥ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﺋ‬ ‫ﺍ‬ ‫ﺮﺩ‬ ‫ﻛ‬ ‫ﺬ‬ ‫ﺗ‬ ‫ﻞ‪:‬‬ ‫ﻜ‬ ‫ﻟﺸ‬ ‫ﺎ‬ ‫ﻪ ‪printmessage‬ﺑ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪﻋﻲ‬ ‫ﺘ‬ ‫ﺍﻥﻧﺴ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﺍﻳ‬ ‫ﺬ‬ ‫ﺍﺱ ‪.‬‬ ‫‪par‬‬ ‫‪a‬‬ ‫‪me‬‬ ‫‪t‬‬ ‫‪e‬‬ ‫‪r‬‬ ‫‪2‬‬ ‫‪.‬‬ ‫)‬ ‫{‬ ‫.‬؟‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺔﻣﻦﺍ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺃﻱﻗ‬ ‫ﺪ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺍﻥﻻﻧ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺩ‬ ‫ﺭ‬ ‫ﻮﺍ‬ ‫ﺍﻟ‬ ‫ﺫ‬ ‫ﺎ‬ ‫ﻜﻦﻣ‬ ‫ﺔ‪٬‬ﻟ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻪﺍ‬ ‫ﺩﺑ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﺬﻱﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻧﻲ‬ ‫ﺎ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﺎﻥ ‪type‬ﻳﺸ‬ ‫ﻓ‬ ‫ﻊ‬ ‫ﻞﻣ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﺎﻧ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻛ‬ ‫ﺜﻼ)ﻭ‬ ‫ﺔﻣ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﺔﺟ‬ ‫ﺎﻋ‬ ‫ﺒ‬ ‫ﻮﻟﻄ‬ ‫ﺔﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﺽﻣﻦ‬ ‫ﻐ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﻭ‬ ‫ﻝﺍ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢﻣﻦ‬ ‫ﻴ‬ ‫ﺪﻗ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺍﻥﻧ‬ ‫ﺎﺝ‬ ‫ﺘ‬ ‫ﻧﺤ‬ ‫ﻝﻻ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻌﺾ‬ ‫ﻔﻲﺑ‬ ‫ﻓ‬ ‫ﺎﺕ‬ ‫ﻴ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻜ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﺔﺳﻲ‪++‬ﻟ‬ ‫ﻐ‬ ‫ﻟ‬ ‫ﺔﺳﻲ‪++‬ﻭ‬ ‫ﻐ‬ ‫ﻊﻟ‬ ‫ﻞﻣ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﺎﻧ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﻜﻦﻻ‬ ‫ﻤ‬ ‫ﻮﻣ‬ ‫ﺪﻫ‬ ‫ﻴ‬ ‫ﻛ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻜﻦ؟ﺑ‬ ‫ﻤ‬ ‫ﻟﻚﻣ‬ ‫ﻞﺫ‬ ‫ﻬ‬ ‫ﺮ ‪(procedure‬ﻓ‬ ‫ﻴﺠ‬ ‫ﻭﺳ‬ ‫ﺮ‬ ‫ﺑ‬ ‫‪٬‬‬ ‫ﺮﻯ‬ ‫ﻻﺧ‬ ‫ﺔﺍ‬ ‫ﻣﺠ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺕ‬ ‫ﻐ‬ ‫ﻠ‬ ‫ﺔﻟ‬ ‫ﺒ‬ ‫ﻨﺴ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺔﺑ‬ ‫ﻗ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺧ‬ ‫ﻨﻲ‬ ‫ﻌ‬ ‫ﺔﺗ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﻮ ‪void‬ﻭ‬ ‫ﺔﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﺩﺑ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﺬﻱﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻉ ‪type‬‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻥ‬ ‫ﻜ‬ ‫ﺍﻥﻳ‬ ‫ﻴﺠﺐ‬ ‫ﺔﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔﻣﻦ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺓﻗ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﺎﻋ‬ ‫ﺮﻏﺐﺑ‬ ‫ﻢﺗ‬ ‫ﺔﻟ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻓﻲﺣ‬ ‫‪٬‬‬ ‫ﺎ‬ ‫ﻫ‬ ‫ﺪ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﻨ‬ ‫ﺔﺳ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺎﻙﻗ‬ ‫ﻨ‬ ‫ﻴﺲﻫ‬ ‫ﻪﻟ‬ ‫ﻧ‬ ‫ﺔ ‪return‬ﻻ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﻮﻱﻋ‬ ‫ﺘ‬ ‫ﺍﻥﻻﺗﺤ‬ ‫ﺔﻳﺠﺐ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻓ‬ ‫ﺎ‬ ‫ﻻﺿ‬ ‫ﺎ‬ ‫ﻭﻻﺷﺊ‪٬‬ﺑ‬ ‫ﺍﻍﺍ‬ ‫ﺮ‬ ‫ﻓ‬ ‫ﺮ‪.‬ﻟ‬ ‫ﻮ‬ ‫ﻗ‬ ‫ﻻ‬ ‫ﻪﺍ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻣﻦﻛ‬ ‫.h‬‬ ‫!‪I'm a function‬‬ ‫ﺔ ‪void‬‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻮﻉﺍ‬ ‫ﻮﻧ‬ ‫ﻫ‬ ‫)( ‪void printmessage‬‬ ‫{‬ ‫.

‫‪Compiler_x@yahoo.‬‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻭﻥﺍﻋ‬ ‫ﺪ‬ ‫ﻴﺴﻲﺑ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﺍﺧ‬ ‫ﺮﺩ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻝﻫ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻜﻦﺍﺳ‬ ‫ﻤ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﺲﻣﻦ‬ ‫ﻪﻟ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﺔﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﺩ‬ ‫ﺍﺧ‬ ‫ﺮﺩ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻳﻒﻣ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﻢﺗ‬ ‫ﻮﺗ‬ ‫ﺎﻟ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺎ‪.5‬‬ ‫.‪return 0‬‬ ‫}‬ ‫ﺮﻕﻓﻲ‬ ‫ﺎﻙﻓ‬ ‫ﻨ‬ ‫ﻫ‬ ‫ﻳﻦﻭ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻮﻉﻋ‬ ‫ﻤ‬ ‫ﺓﻣﺠ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻴﺲﺍﻋ‬ ‫ﻟ‬ ‫ﻳﻦﻭ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻮﻉﻋ‬ ‫ﻤ‬ ‫ﺔﻣﺠ‬ ‫ﺎﻋ‬ ‫ﺒ‬ ‫ﺪﻟﻄ‬ ‫ﻛ‬ ‫ﺅ‬ ‫ﺃ‬ ‫ﻳﻦﻭ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻮﻉﻋ‬ ‫ﻤ‬ ‫ﺔﻣﺠ‬ ‫ﺎﻋ‬ ‫ﺒ‬ ‫ﺔﻫﻲﻟﻄ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﻓ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ـﻧ‬ ‫ﺎﻓ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﺗﺠ‬ ‫ﺎ‬ ‫ﺓﻧ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﺍﻋ‬ ‫ﻴﺲ‬ ‫ﻟ‬ ‫ﻘﻂﻭ‬ ‫ﺎﻓ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﺗﺠ‬ ‫ﺎ‬ ‫ﺔﻧ‬ ‫ﺎﻋ‬ ‫ﺒ‬ ‫ﺎﻭﻃ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﻦ‬ ‫ﻠ‬ ‫ﺮﺳ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻦ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻊ‬ ‫ﻤ‬ ‫ﻠﺨﺺﺑﺠ‬ ‫ﺘ‬ ‫ﺔﻳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻴﻦ‪٬‬ﻓ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﺘﺐ‬ ‫ﻜ‬ ‫ﺔﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺎﻥﺑ‬ ‫ﺍﻓ‬ ‫ﺬ‬ ‫ﺍﺕ‪٬‬ﻟ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻟﻰﺑ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﺎﺝﻓﻲﻋ‬ ‫ﺘ‬ ‫ﺎﺗﺤ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﺍﺕﻻ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺬﺑ‬ ‫ﺎﺧ‬ ‫ﺎﺗ‬ ‫ﻬ‬ ‫ﻨ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍﻍﻭ‬ ‫ﺮ‬ ‫ﺃﻱﻓ‬ ‫ﻮ ‪void‬‬ ‫ﻫ‬ ‫ﺔ‪. int b‬‬ ‫{‬ ‫.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪10‬‬ ‫ﺍ‪:‬‬ ‫ﺪ‬ ‫ﺔﺟ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﺔﻣ‬ ‫ﻣﻼﺣﻈ‬ ‫ـ‬ ‫ﺎ‪٬‬ﻓ‬ ‫ﻗ‬ ‫ﺍﻃﻼ‬ ‫ﻴﺢ‬ ‫ﺮ ﺻﺤ‬ ‫ﻴ‬ ‫ﺍﺷﺊﻏ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﺍﺕﻭ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻠﻰﺑ‬ ‫ﻮﻱﻋ‬ ‫ﺘ‬ ‫ﺗﺤ‬ ‫ﺔ )‪(void‬ﻻ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ّ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺍﻥﻛ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﻨﻚ‬ ‫ﻫ‬ ‫ﻟﻰﺫ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺪﻳ‬ ‫ﻗ‬ ‫ﻞ‬ ‫ﻤ‬ ‫ﺎﻓﻲﻋ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺎﺝﺍ‬ ‫ﺘ‬ ‫ﻧﺤ‬ ‫ﺎﻻ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﺍﺕﻻ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻪﺑ‬ ‫ﻴ‬ ‫ﺮﻓ‬ ‫ﻛ‬ ‫ﺬ‬ ‫ﻢﻧ‬ ‫ﻠ‬ ‫ﺑﻖﻓ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﻝﺍ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻣ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺝ‬ ‫ﻴ‬ ‫ﺘ‬ ‫ﻡﺣﺴﺐﺍﺣ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺔﺗﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺑ‬ ‫ﺪ‬ ‫ﺍﺟ‬ ‫ﻮ‬ ‫ﺘ‬ ‫ﺔﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻴﺚﺑ‬ ‫ﻘﻂﻫﻲ ‪I'm a function‬ﺣ‬ ‫ﺔﻓ‬ ‫ﺘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺔﺛ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺓﻣ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﺔﻋ‬ ‫ﺎﻋ‬ ‫ﺒ‬ ‫ﺔﻫﻲﻟﻄ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔﻣﻦ‬ ‫ﺎﺟ‬ ‫ﻟﺤ‬ ‫ﺔﻻﻥﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ءﻋ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﺔﻻ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺝ‬ ‫ﻴ‬ ‫ﺘ‬ ‫ﺣﺴﺐﺍﺣ‬ ‫ﻝ‪:‬‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻣ‬ ‫‪// function example‬‬ ‫>‪#include <iostream‬‬ ‫‪the result is 8‬‬ ‫)‪void addition (int a.‬‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺎﺟ‬ ‫ﺣﺴﺐﺣ‬ ‫ﺍﺕ ‪scope of variable‬‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝ(‬ ‫ﺎ‬ ‫ﻭﻣﺠ‬ ‫ﺍ‬ ‫ﺪﻯ)‬ ‫ﻣ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻞﺟﺴ‬ ‫ﺍﺧ‬ ‫ﻞ ‪a‬ﺩ‬ ‫ﺜ‬ ‫ﺮﻣ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﺎﻣ‬ ‫ﻨ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﻮﻋ‬ ‫ﺜﻼﻟ‬ ‫ﻤ‬ ‫‪٬‬ﻓ‬ ‫ﻞ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻠ‬ ‫ﻟﺢﻟ‬ ‫ﺎ‬ ‫ﻪﺻ‬ ‫ﻴ‬ ‫ﺮﻓ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻥ‬ ‫ﻜ‬ ‫ﺬﻱﻳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺎ‬ ‫ﻤﺠ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺎﻥﺍ‬ ‫ﻜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻮﺍ‬ ‫ﺮﻫ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺪﻯﺍ‬ ‫ﻣ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﺮﻑﺑ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻤﻰ‬ ‫ﻳﺴ‬ ‫ﺎﻭ‬ ‫ﻬ‬ ‫ﺭﺟ‬ ‫ﺎ‬ ‫ﻪﺧ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺍﺳ‬ ‫ﺯ‬ ‫ﻮ‬ ‫ﻻﻳﺠ‬ ‫ﻘﻂﻭ‬ ‫ﺔﻓ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺍﺧ‬ ‫ﻢﺩ‬ ‫ﺘ‬ ‫ﻪﻳ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺎﻥﺍﺳ‬ ‫ﺔﻓ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻯ‬ ‫ﺍﺧ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﺩ‬ ‫ﺍﺧ‬ ‫ﻢﺩ‬ ‫ﻻﺳ‬ ‫ﻔﺲﺍ‬ ‫ﻨ‬ ‫ﺮﺑ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻡﻣ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺍﺳ‬ ‫ﺪ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﺔﻧ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻓﻲﺣ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻠﻲ ‪local variable‬ﻟ‬ ‫ﺮﻣﺤ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﺔﺑ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺮﻑﻓﻲﺍ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺮﺍ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻠﻒﻋﻦﺍ‬ ‫ﺘ‬ ‫ﻮﻳﺨ‬ ‫ﻫ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻚ‬ ‫ﺘ‬ ‫ﻠﻲﻟ‬ ‫ﺮﻣﺤ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﺮﻛ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﻌ‬ ‫ﻳ‬ ‫ﺪﻭ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﺮﻣﻦﺟ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺮﻑﻫ‬ ‫ﻌ‬ ‫ﺎﻧ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻓ‬ ‫ﺔ‪.)‪addition (3.‪cout<<"the result is"<<a+b‬‬ ‫}‬ ‫)( ‪int main‬‬ ‫{‬ ‫.‬‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﺮﻑﻓ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻠﻲﻟ‬ ‫ﺮﻣﺤ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﺎﻛ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﻌ‬ ‫ﻳ‬ ‫ﻳﻒﻭ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻤﻰ‬ ‫ﻳﺴ‬ ‫ﻣﺞﻭ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﺃﻱﻓﻲﺟﺴ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺃﻱﺩ‬ ‫ﺭﺝ‬ ‫ﺎ‬ ‫ﺮﻑﺧ‬ ‫ﻌ‬ ‫ﻪﻳ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻣﺞﻓ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺍ‬ ‫ﺰ‬ ‫ﺍﺟ‬ ‫ﻊ‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﻞﺟ‬ ‫ﺍﺧ‬ ‫ﻪﺩ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﻜﻦﺍﺳ‬ ‫ﻤ‬ ‫ﺮﻳ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻳﻒﻣ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﻭ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ءﺍ‬ ‫ﺍ‬ ‫ﺰ‬ ‫ﻞﺍﺟ‬ ‫ﺮﻑﻓﻲﻛ‬ ‫ﻌ‬ ‫ﻮﻣ‬ ‫ﻫ‬ ‫ﻤﻲ ‪global variable‬ﻭ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺎﺑ‬ ‫ﻫ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻋ‬ .

'‪cout<<"name is : "<<n<<'\n‬‬ ‫.h‬‬ ‫ﻲ ‪//global variable‬‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺮﻋ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻣ‬ ‫.‫‪Compiler_x@yahoo.‪int age‬‬ ‫)]‪void print_info(char n[20‬‬ ‫{‬ ‫.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪11‬‬ ‫>‪#include <iostream.‬‬ ‫ﻔ‬ ‫ﻠ‬ ‫ﺘ‬ ‫ﻳﻦﻣﺨ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﺎﻣ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻣﻼﻥﻛ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﻳ‬ ‫ﺎﻭ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﺔﺑ‬ ‫ﻗ‬ ‫ﺃﻱﻋﻼ‬ ‫ﺪ‬ ‫ﻮﺟ‬ ‫ﻻﻳ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪name‬ﻓﻲ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻊﻭ‬ ‫ﺮﺟ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺍﺳﻄ‬ ‫ﻮ‬ ‫ﻝﺑ‬ ‫ﺎ‬ ‫ﺭﺳ‬ ‫ﻻ‬ ‫ﺍ‬ ‫‪Passed by value and reference‬‬ ‫ﺮ‬ ‫ﻛ‬ ‫ﺬ‬ ‫ﻧﻚﺗ‬ ‫ﻊﺍ‬ ‫ﻗ‬ ‫ﻮ‬ ‫ﺗ‬ ‫؟ﺍ‬ ‫ﻟﻚ؟‬ ‫ﺮﺫ‬ ‫ﻛ‬ ‫ﺬ‬ ‫ﻞﺗ‬ ‫ﺔﻫ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻻﺻ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﺲ‬ ‫ﻟ‬ ‫ﻝﻭ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻟﻰﺍ‬ ‫ﺍﺕﺍ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺔﻣﻦﺍ‬ ‫ﺎﻧﺴﺨ‬ ‫ﻧ‬ ‫ﺭ‬ ‫ﺮ‬ ‫ﺎﻣ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺎﺳ‬ ‫ﻨ‬ ‫ﻠ‬ ‫ﺪﻗ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺔ‪."‪char name[20]="my name‬‬ ‫.‪cin>>age‬‬ ‫.‬‬ ‫ﻻﺻ‬ ‫ﺮﺍ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻟﻰﺍ‬ ‫ﻊﺍ‬ ‫ﺮﺟ‬ ‫ﻴ‬ ‫ﺔﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺍﺧ‬ ‫ﺍﺕﺩ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﺮﻋ‬ ‫ﻴ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍﻥﺍ‬ ‫ﺃﻱ‬ ‫)‪(pass by reference‬‬ ‫ﺩﻓﻲ‬ ‫ﻮ‬ ‫ﻮﺟ‬ ‫ﺎﻣ‬ ‫ﻤ‬ ‫ﻮﻛ‬ ‫ﻬ‬ ‫ﺔﻓ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺮﺑ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﻟﻰﺍ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﻊﻭ‬ ‫ﺮﺟ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺮﺑ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻴ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻴﺤﻲﻋﻦ‬ ‫ﻮﺿ‬ ‫ﻝﺗ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻴﻚﻣ‬ ‫ﻟ‬ ‫ﻻﻥﺍ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﻴﻦ‬ ‫ﻮﻋ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﻦ‬ ‫ﺔﺑ‬ ‫ﻐ‬ ‫ﻴ‬ ‫ﻟﺼ‬ ‫ﺍ‬ ‫ﺮﻓﻲ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﺘﻼﻑﻛ‬ ‫ﺪﺍﺧ‬ ‫ﻮﺟ‬ ‫ﻻﻳ‬ ‫ﺔﻭ‬ ‫ﻘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻠ‬ ‫ﺜ‬ ‫ﻣ‬ ‫ﻊﺍ‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﺟ‬ .‬‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ءﺍ‬ ‫ﺎ‬ ‫ﻴ‬ ‫ﻻﺷ‬ ‫ﻌﺾﺍ‬ ‫ﺎﺡﺑ‬ ‫ﻳﻀ‬ ‫ﻠﻰﺍ‬ ‫ﺎﻋ‬ ‫ﻨ‬ ‫ﺗﻲﻫ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺍﺳ‬ ‫ﺬ‬ ‫‪٬‬ﻟ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻠﻰﻫ‬ ‫ﻪﻋ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﺮﻧﺠ‬ ‫ﻴ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺃﻱﺗ‬ ‫ﺎﻥ‬ ‫ﺔﻓ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻓﻲﻫ‬ ‫ﻝﻭ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻟﻰﺍ‬ ‫ﺍﺕﺍ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺭﻧﺴﺦﻣﻦﺍ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺎﻧ‬ ‫ﻨ‬ ‫ﺔﻛ‬ ‫ﻘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻠ‬ ‫ﺜ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﻊ‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﻓﻲﺟ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﺍﺧ‬ ‫ﺍﺕﺩ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﺔﻟ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟﺤ‬ ‫ﻢﺍ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﺮﻋ‬ ‫ﺛ‬ ‫ﺆ‬ ‫ﻮﻑﻟﻦﻳ‬ ‫ﺜﻼ(ﺳ‬ ‫ﺮﻣ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺮﻓﻲﻗ‬ ‫ﻴ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺗ‬ ‫ﻝ)‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﺍﺧ‬ ‫ﺍﺕﻓﻲﺩ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻠﻰﺍ‬ ‫ﻢﻋ‬ ‫ﺘ‬ ‫ﺬﻱﻳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﺮ‬ ‫ﺍﺧ‬ ‫ﻨﻰ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﺑ‬ ‫ﻭ‬ ‫ﺎ)‬ ‫ﻬ‬ ‫ﻨ‬ ‫ﺎﻧﺴﺦﻋ‬ ‫ﻨ‬ ‫ﻠ‬ ‫ﺭﺳ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻨ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺮﺳ‬ ‫ﻢﻧ‬ ‫ﺎﻟ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﺔﻻ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ) ‪pass by‬‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﺍﺳﻄ‬ ‫ﻮ‬ ‫ﺮﺑ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻤﻰﻫ‬ ‫ﻴﺴﻲ(ﺗﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﻣﺞﺍ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﺒ‬ ‫ﺋﻲﻣﻦﻗ‬ ‫ﺮ‬ ‫ﺮﻣ‬ ‫ﻴ‬ ‫ﻮﻥﻏ‬ ‫ﻜ‬ ‫ﻮﻑﻳ‬ ‫ﺔﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﺍﺧ‬ ‫ﺩ‬ ‫ﺮ‪.‪cout<<"age = "<<age‬‬ ‫}‬ ‫‪//local variable‬‬ ‫)(‪void main‬‬ ‫{‬ ‫.)‪print_info(name‬‬ ‫}‬ ‫ﺎﻥﻣﻦ‬ ‫ﻜ‬ ‫ﺃﻱﻣ‬ ‫ﻞ‬ ‫ﺍﺧ‬ ‫ﻪﺩ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺍﺳ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻨ‬ ‫ﻜ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻟ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﺭﺝﺟﺴ‬ ‫ﺎ‬ ‫ﻪﺧ‬ ‫ﻔ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﻢﺗ‬ ‫ﻤﻲ ‪global‬ﺗ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺮﻋ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻮﻣ‬ ‫ﺮ ‪age‬ﻫ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻣ‬ ‫ﺔ‪٬‬ﺍ‬ ‫ﻔ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺓﺗ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻟﻰﺍﻋ‬ ‫ﺔﺍ‬ ‫ﺎﺟ‬ ‫ﻟﺤ‬ ‫ﻭﻥﺍ‬ ‫ﺩ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﻮ‬ ‫ﻬ‬ ‫ﺔ ‪print_info‬ﺑﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ءﻓﻲ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﺮﻯﺳ‬ ‫ﺎﺗ‬ ‫ﻤ‬ ‫ﻣﺞﻛ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﻳ‬ ‫ﺔ ‪print_info‬ﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔﻓﻲ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﻜﻦﺍﺳ‬ ‫ﻤ‬ ‫ﺍﻻﻳ‬ ‫ﺬ‬ ‫ﺔﻟ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻠﻲ ‪local‬ﻟ‬ ‫ﺮﻣﺤ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻪﻣ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﺮ ‪name‬ﻓ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﻋﻦ‬ ‫ﻘ‬ ‫ﺘ‬ ‫ﻪﻣﺴ‬ ‫ﻧ‬ ‫ﻟﻰﺍ‬ ‫ﺓﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻻﺷ‬ ‫ﺍ‬ ‫ﻊ‬ ‫ﻩﻣ‬ ‫ﺪ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻮﻉﺗ‬ ‫ﺎﻱﻧ‬ ‫ﺑ‬ ‫ﺔ ‪print_info‬ﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﺍﺧ‬ ‫ﻢ ‪name‬ﺩ‬ ‫ﻻﺳ‬ ‫ﻔﺲﺍ‬ ‫ﻨ‬ ‫ﺮﺑ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﺮﻑﻣ‬ ‫ﻌ‬ ‫ﺗ‬ ‫ﻴﻦ‪.‬‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﻴ‬ ‫ﺎﻗ‬ ‫ﻨ‬ ‫ﻠ‬ ‫ﺭﺳ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺎﺍ‬ ‫ﻧ‬ ‫ﺭ‬ ‫ﺮ‬ ‫ﺎﻣ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺃﻱ‬ ‫‪(value‬‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻠﻰﻗ‬ ‫ﺮﻋ‬ ‫ﻴ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻴﺚﺍﻥﻫ‬ ‫ﻞﺑﺤ‬ ‫ﺮﺳ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺮﺍ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﺔﻟ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻻﺻ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﺮﻋ‬ ‫ﻴ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺮﻱﺗ‬ ‫ﺍﻥﻧﺠ‬ ‫ﺎﺝ‬ ‫ﺘ‬ ‫ﺮﻯﻧﺤ‬ ‫ﺍﺧ‬ ‫ﺎﻥ‬ ‫ﻴ‬ ‫ﺍﺣ‬ ‫ﻓﻲ‬ ‫ﻭ‬ ‫ﻊ‬ ‫ﺮﺟ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺮﺑ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻤﻰﻫ‬ ‫ﺗﺴ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻠﻲﻓﻲﺍ‬ ‫ﻻﺻ‬ ‫ﺮﺍ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻔﺴ‬ ‫ﺮﻧ‬ ‫ﻴ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺩﻫ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﻴ‬ ‫ﺔﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﺍﺧ‬ ‫ﺩ‬ ‫ﻠﻲ‪.

int& b.h‬‬ ‫‪x=2.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪12‬‬ ‫ﺔ ‪pass by reference‬‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺮﺑ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪// passing parameters by reference‬‬ ‫>‪#include <iostream.‬‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺝ‬ ‫ﺘ‬ ‫ﺎﺗﺤ‬ ‫ﺓﻭﺣﺴﺐﻣ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﺔﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻣﻦﻗ‬ ‫ﻟﻲ‪:‬‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﻝﺍ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﻚ‬ ‫ﻟ‬ ‫ﺍ‬ . z=" << z‬‬ ‫. y=3.)‪duplicate (x.‪return 0‬‬ ‫}‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺮﺳ‬ ‫ﺘﻲﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻔ‬ ‫ﺎﻋ‬ ‫ﺎﻣﻀ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﻔ‬ ‫ﻴ‬ ‫ﺎ ‪duplicate‬ﻭﺿ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﺔﺍﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰﺩ‬ ‫ﻮﻱﻋ‬ ‫ﺘ‬ ‫ﻣﺞﻳﺤ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻠ‬ ‫ﻧﻲﻟ‬ ‫ﺎ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻮﻉﺍ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺪﺍ‬ ‫ﻌ‬ ‫ﺔﺑ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻒ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺮﺗ‬ ‫ﻘﻲ ) & (ﻓﻲﺳﻄ‬ ‫ﻨﻄ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻊ‬ ‫ﻤ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻣ‬ ‫ﺩﻋﻼ‬ ‫ﻮ‬ ‫ﻮﻭﺟ‬ ‫ﺪﻫ‬ ‫ﻴ‬ ‫ﻮﺣ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪﻭ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﻟﺸﺊ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﺎﻟ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﻊ ‪by reference‬‬ ‫ﺮﺟ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺍﺳﻄ‬ ‫ﻮ‬ ‫ﻢﺑ‬ ‫ﻫ‬ ‫ﺮ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻢﺗ‬ ‫ﺍﺕ ‪a.‫‪Compiler_x@yahoo.‪a*=2‬‬ ‫. int& b . y=6.‬‬ ‫‪x‬‬ ‫( ‪duolicate‬‬ ‫ﺔ‪:‬‬ ‫ﻣﻼﺣﻈ‬ ‫ﺮ‬ ‫ﺜ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺔﺍﻥﺗ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺔﻫ‬ ‫ﺍﺳﻄ‬ ‫ﻮ‬ ‫ﺑ‬ ‫ﻧﻚﻭ‬ ‫ﺎ‬ ‫ﻜ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﺒﺢﺑ‬ ‫ﻻﻥﺍﺻ‬ ‫ﺍ‬ ‫ﻜﻦ‬ ‫ﺎ‪٬‬ﻟ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﺎﺳ‬ ‫ﻩﺑ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﺔﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺪﻗ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺔﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞﺩ‬ ‫ﺍﻥﻛ‬ ‫ﺎ‬ ‫ﻘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺗﻚﺳ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﺍﺧ‬ ‫ﺪ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﻪ‪.‪int x=1. y=3.b. z‬‬ ‫.‪cout << "x=" << x << ". y.‪c*=2‬‬ ‫}‬ ‫)( ‪int main‬‬ ‫{‬ ‫.‬‬ ‫‪y‬‬ ‫‪.‪b*=2‬‬ ‫. z=7‬‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻠ‬ ‫ﺬﻟ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻴﺠ‬ ‫ﺘ‬ ‫ﻮﻥﻧ‬ ‫ﻜ‬ ‫ﺗ‬ ‫ﻭ‬ ‫ﻭ‬ ‫ﺍ‬ ‫ﺎﺕ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻝ‬ ‫ﺭﺳ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻔﺴ‬ ‫ﺍﺕﻧ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫) ‪void duplicate ( int& a .c‬ﻭﻋ‬ ‫ﻢﻛ‬ ‫ﻴ‬ ‫ﺔﻗ‬ ‫ﻔ‬ ‫ﺎﻋ‬ ‫ﻮﻣﻀ‬ ‫ﺔﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻣﺖﺑ‬ ‫ﺎ‬ ‫ﺎﻗ‬ ‫ﻣ‬ ‫ﻻﻥ ‪a=1‬ﻭ ‪b=3‬ﻭ ‪c=7‬ﻭ‬ ‫ﺍ‬ ‫ﺒﺢ‬ ‫ﻪﺍﺻ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺃﻱ‬ ‫ﻟﻲ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻟﻰﺍ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻫ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺍﺳ‬ ‫ﻭﻱ ‪2‬ﻭ‬ ‫ﺎ‬ ‫ﺒﺤﺖﺗﺴ‬ ‫ﺘﻲﺍﺻ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓﻭ‬ ‫ﺪ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﺔ‪a‬‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻭﺝﻗ‬ ‫ﺮ‬ ‫ﺎﺡﺑﺨ‬ ‫ﻤ‬ ‫ﻟﺴ‬ ‫ﺎ‬ ‫ﺔ &ﺑ‬ ‫ﻣ‬ ‫ﻌﻼ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻡ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺔﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻞﻓﻲﻫ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻚ‬ ‫ﺬ‬ ‫ﻛ‬ ‫ﻴﺴﻲﻭ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ ‪y‬ﻓﻲ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﻭﻱ ‪9‬ﺍ‬ ‫ﺎ‬ ‫ﺒﺤﺖﺗﺴ‬ ‫ﺍﺻ‬ ‫ﺘﻲ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ ‪b‬ﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ءﻗ‬ ‫ﺎ‬ ‫ﺍﻋﻄ‬ ‫ﻟﻚ‬ ‫ﺬ‬ ‫ﻛ‬ ‫ﻴﺴﻲﻭ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫‪x‬ﻓﻲﺍ‬ ‫ﺔ ‪duplicate‬ﻻﻥ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ءﻟ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺪﺍ‬ ‫ﻌ‬ ‫ﺮﺑ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﺘ‬ ‫ﺔﺳ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺕﻓﻲ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻥ‬ ‫ﺍﻓ‬ ‫ﺬ‬ ‫ﺮ ‪z‬ﻟ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﺔ ‪c‬ﺳ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻗ‬ ‫ﻴﺴﻲ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﺍﺕﻟﻦﺗ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻴ‬ ‫ﺎﻥﻗ‬ ‫ﺎﺕ &ﻓ‬ ‫ﻣ‬ ‫ﺩﻋﻼ‬ ‫ﻮ‬ ‫ﻡﻭﺟ‬ ‫ﺪ‬ ‫ﺔﻋ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻓﻲﺣ‬ ‫‪٬‬ﻭ‬ ‫ﻊ‬ ‫ﺮﺟ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﺍﺳﻄ‬ ‫ﻮ‬ ‫ﻢﺑ‬ ‫ﺎﺗ‬ ‫ﻬ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺭﺳ‬ ‫ﺍ‬ ‫ﻣﺞﻫﻲ ‪. x=1. int& c‬‬ ‫{‬ ‫. z=14‬‬ ‫)‪void duplicate (int& a. int& c‬‬ ‫‪x‬‬ ‫‪y‬‬ ‫‪z‬‬ ‫.b.)‬ ‫‪z‬‬ ‫‪. z=7‬‬ ‫.c‬ﺗ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍﻥﺍ‬ ‫ﻠﻰ‬ ‫ﻞﻋ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﻫﻲﺩ‬ ‫ﻪﻭ‬ ‫ﻔﺴ‬ ‫ﺮﻧ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺒ‬ ‫ﻗ‬ ‫ﻭ‬ ‫ﻪ‪:‬‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺮﻙ‬ ‫ﺒ‬ ‫ﺎﺧ‬ ‫ﻧﻲﺳ‬ ‫ﺎ‬ ‫ﻣﺞﻓ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻯﻓﻲ‬ ‫ﺎﺟ‬ ‫ﻤ‬ ‫ﻨﻲﻋ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺄ‬ ‫ﺳ‬ ‫ﻠﻰ‬ ‫ﺘﻲﻫﻲ ‪a‬ﻭ ‪b‬ﻭ ‪c‬ﻋ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻟﻰﺑ‬ ‫ﺍ‬ ‫ﻌﻄﻰ‬ ‫ﺘ‬ ‫ﺍﺕ ‪x‬ﻭ ‪y‬ﻭ ‪ z‬ﺳ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻥ‬ ‫ﺔ ‪duplicate‬ﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻋ‬ ‫ء‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻞﻣﻦ ‪a. y=" << y << ".

‬ﻫ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻜﻞﻣ‬ ‫ﻟ‬ ‫ﻪ‬ ‫ﻴ‬ ‫ﺍﺿ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻓ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺩﻗ‬ ‫ﺪ‬ ‫ﺍﻥﻧﺤ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﻪﻳ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻪﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻻﻋﻼﻥﻋﻦﺩ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻋ‬ ‫ﺩ ) = (ﻭ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺍﻻﺳ‬ ‫ﻪ‬ ‫ﻣ‬ ‫ﻡﻋﻼ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺍﻥﻧﺴ‬ ‫ﻟﻚﻳﺠﺐ‬ ‫ﻤﻞﺫ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﻪ ‪.‪cout << endl‬‬ ‫.‪r=a/b‬‬ ‫.‬‬ ‫ﻣ‬ ‫ﺎﻋﻼ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻟ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻒ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺪﺗ‬ ‫ﻨ‬ ‫ﻋ‬ ‫ﻊ‪.h‬‬ ‫)‪int divide (int a. int b=2‬‬ ‫{‬ ‫. y.‪return 0‬‬ ‫}‬ .‪next = x+1‬‬ ‫}‬ ‫)( ‪int main‬‬ ‫{‬ ‫. Next=101‬‬ ‫)‪void prevnext (int x.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪13‬‬ ‫‪// more than one returning value‬‬ ‫>‪#include <iostream.‬ﻭ‬ ‫ﻴ‬ ‫ﺍﺿ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻓ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ـﻗ‬ ‫ﺎﻛ‬ ‫ﻘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺎﺳ‬ ‫ﻫ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﺘﻲﺣ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺎﺧ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ءﻓ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﻻﺳ‬ ‫ﺜﻼ‪:‬‬ ‫ﺎ ‪.‪prev = x-1‬‬ ‫.)‪return (r‬‬ ‫}‬ ‫)( ‪int main‬‬ ‫{‬ ‫. z‬‬ ‫.h‬‬ ‫‪Previous=99.)‪cout << divide (20.‬ﺣ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻒ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﻪﻓﻲﺗ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻌ‬ ‫ﻨﻀ‬ ‫ﺘﻲﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻴ‬ ‫ﺍﺿ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻓ‬ ‫ﺍﻻ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻪﻋ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻚ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺎﻗ‬ ‫ﻧ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻪﺣ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻜﻦﻓﻲﺣ‬ ‫ﻟ‬ ‫ﻪ ‪.‬ﻣ‬ ‫ﻬ‬ ‫ﻨ‬ ‫ﺪﻝﻣ‬ ‫ﻪﺑ‬ ‫ﻠ‬ ‫ﺮﺳ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻤﻞ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﺘﺴ‬ ‫ﻪﻭﺳ‬ ‫ﻴ‬ ‫ﺍﺿ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻓ‬ ‫ﺍﻻ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻫﻞ‬ ‫ﺎ‬ ‫ﺘﺠ‬ ‫ﺘ‬ ‫ﺎﺳ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ءﻓ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﻻﺳ‬ ‫‪3‬‬ ‫‪5‬‬ ‫‪// default values in functions‬‬ ‫>‪#include <iostream.‫‪Compiler_x@yahoo. int& prev.‬ﻭ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻚ‬ ‫ﺎﻥﺗ‬ ‫ﻜ‬ ‫ﻪﻓﻲﻣ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻪﻗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻟ‬ ‫ﺮﺳﻞ‬ ‫ﻢﻧ‬ ‫ﻟ‬ ‫ﺍﻱ‬ ‫ﺭﻍ‬ ‫ﺎ‬ ‫ﻪﻓ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻪﻋ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻚ‬ ‫ﻪﻓﻲﺗ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺍﻱﻗ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻟ‬ ‫ﺭ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻢﻧ‬ ‫ﻟ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻴﺚﻓﻲﺣ‬ ‫ﻪ ‪. z‬‬ ‫.)‪cout << divide (6‬‬ ‫.‪cout << "Previous=" << y << ".)‪prevnext (x.‪int r‬‬ ‫.‪return 0‬‬ ‫}‬ ‫ﻞ‬ ‫ﺮﺳ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻠ‬ ‫ﺔ ‪next‬ﻟ‬ ‫ﻘ‬ ‫ﻟﻼﺣ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ ‪previous‬ﻭ‬ ‫ﻘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻳﺠ‬ ‫ﺎ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻝﺗ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺔﻓﻲﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻊﻓﻲ‬ ‫ﻢﻧﻀ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻟ‬ ‫ﻪ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻪﻗ‬ ‫ﻨ‬ ‫ﺪﻣ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺍﻥﻧ‬ ‫ﺎﺝ‬ ‫ﺘ‬ ‫ﻪﻭﻻﻧﺤ‬ ‫ﻟ‬ ‫ﻪ‬ ‫ﻘ‬ ‫ﻟﻼﺣ‬ ‫ﺍ‬ ‫ﻪﻭ‬ ‫ﻘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻳﺠ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻗ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰﻫﻲ‬ ‫ﻭ‬ ‫ﺍﻻ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﻻﺣﻆ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻌ‬ ‫ﺍﻭﺿ‬ ‫ﺬ‬ ‫ﻟ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺭﺝ‬ ‫ﺎ‬ ‫ﺎﺧ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺝ‬ ‫ﺘ‬ ‫ﻧﺤ‬ ‫ﻪﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺧﻞ‬ ‫ﺎﺩ‬ ‫ﻤ‬ ‫ﻫ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻳﺠ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﺘ‬ ‫ﻟﻼﺣﻖﻳ‬ ‫ﺍ‬ ‫ﺑﻖﻭ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻗ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﻪ & ‪.‬‬ ‫ﺮﺟ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﺍﺳﻄ‬ ‫ﻮ‬ ‫ﺎﺑ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺭﺳ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻠ‬ ‫ﺔﻟ‬ ‫ﻴ‬ ‫ﺍﺿ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻓ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪Default values of parameters‬‬ ‫ﺎﻥ‬ ‫ﻜ‬ ‫ﺎﻣ‬ ‫ﻨ‬ ‫ﻛ‬ ‫ﺮ‬ ‫ﻪﺗ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻪﻓﻲﺣ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﺘﺴ‬ ‫ﺔﺳ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻪ ‪.‪int x=100. y.‬ﺑ‬ ‫ﻣ‬ ‫ﻪﻋﻼ‬ ‫ﻟ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻒ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺗ‬ ‫ﻢ‬ ‫ﺎﻥﺗ‬ ‫ﺗ‬ ‫ﺮ‬ ‫ﺍﻻﺧ‬ ‫ﺎﻥ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﻪﺑ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﺍﺳﻄ‬ ‫ﻮ‬ ‫ﺎﺑ‬ ‫ﻬ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺭﺳ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻟﻰﺗ‬ ‫ﻭ‬ ‫ﺍﻻ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﺃﻱ‬ ‫ﺎﺕ & ‪. Next=" << z‬‬ ‫. int& next‬‬ ‫{‬ ‫.4‬‬ ‫.

( 6/2‬‬ ‫ﺎ‬ ‫ﻪﻧ‬ ‫ﻧ‬ ‫ﻮ ‪3‬ﻻ‬ ‫ﻪﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻧﻲ ‪:‬‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﻓﻲﺍ‬ ‫)‪divide (20. (20/4)=5‬‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺪﺍ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﻪﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻌ‬ ‫ﺘﺠ‬ ‫ﺘﻲﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻫﻲ ‪4‬ﻭ‬ ‫ﺎﻭ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻠ‬ ‫ﺮﺳ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﺓﺗﺤ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻳ‬ ‫ﺯ‬ ‫‪Overloaded functions‬‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺩ ‪.m=2.0. int b‬‬ ‫{‬ ‫.h‬‬ ‫)‪int operate (int a.‫‪Compiler_x@yahoo.‬ﻟ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﺪﻣ‬ ‫ﻮﺟ‬ ‫ﺎﻳ‬ ‫ﻨ‬ ‫ﻫ‬ ‫ﻪ ‪ 5‬ﻻﻥ ‪.‪return 0‬‬ ‫}‬ ‫ﺢ ‪int‬‬ ‫ﻴ‬ ‫ﻟﺼﺤ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺎﺕﻣﻦﺍ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻞﻣ‬ ‫ﺒ‬ ‫ﻘ‬ ‫ﻴﻦﺗ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪﻯ‬ ‫ﺍﺣ‬ ‫ﻜﻦ‬ ‫ﻮ ‪.‬ﺍ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟﺤ‬ ‫ﻮﻉﺍ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺕﻣﻦ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻣ‬ ‫ﻮﻉ ‪. operate‬ﻟ‬ ‫ﻫ‬ ‫ﻢﻭ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﻔﺲ‬ ‫ﻨ‬ ‫ﻴﻦﺑ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺩ‬ ‫ﻨ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﻪﻋ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻓﻲﻫ‬ ‫ﻞ‬ ‫ﻪﻓﻲﻛ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﻫﺐﺍ‬ ‫ﺬ‬ ‫ﻝﻳ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺮﻑﺍﻱﻣﻦﺍ‬ ‫ﻌ‬ ‫ﻣﺞ ‪compiler‬ﻳ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﺮﺟ‬ ‫ﺘ‬ ‫ﻘﻲ ‪.5‬‬ ‫‪// overloaded function‬‬ ‫>‪#include <iostream.)‪cout << operate (n.y=2‬‬ ‫."‪cout << "\n‬‬ ‫.‪float n=5.4‬‬ ‫ﺬ‬ ‫ﺎﺧ‬ ‫ﺘ‬ ‫ﺍﻥ ‪b‬ﺳ‬ ‫ﺎﻭ‬ ‫ﻬ‬ ‫ﻠ‬ ‫ﻫ‬ ‫ﺎ‬ ‫ﻢﺗﺠ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﺮ ‪( int b=2 ) b‬ﺳ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﺎﻟ‬ ‫ﻘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﻩﺳ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻤﺤ‬ ‫ﻟ‬ ‫ﻪﺍ‬ ‫ﻴ‬ ‫ﺍﺿ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻓ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻥ‬ ‫ﺍﻓ‬ ‫ﺬ‬ ‫ﺎﻥ ‪. int‬‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ."‪cout << "\n‬‬ ‫.‬ﻟ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻪﺑ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﻪ ‪divide‬ﻣ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻜﻦ‬ ‫ﻟ‬ ‫ﻪ ‪.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪14‬‬ ‫ﻝ‪:‬‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﻪ ‪divide‬ﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻴﻦﻟ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺎﻙ‬ ‫ﻨ‬ ‫ﻝﻫ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻯﻓﻲ‬ ‫ﺎﻧ‬ ‫ﻤ‬ ‫ﻛ‬ ‫)‪divide (6‬‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺍﻥﻗ‬ ‫ﺮﺿﺖ‬ ‫ﺘ‬ ‫ﻓ‬ ‫ﻪﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻥ‬ ‫ﺍﻓ‬ ‫ﺬ‬ ‫ﻴﻦ ‪.‪int x=5.0‬‬ ‫.m‬‬ ‫.‬ﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻩﻟ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﻪﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺎﻗ‬ ‫ﻨ‬ ‫ﻠ‬ ‫ﺭﺳ‬ ‫ﺎﺍ‬ ‫ﻨ‬ ‫ﻴﺚﻫ‬ ‫ﺣ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺗﺞ‬ ‫ﺎ‬ ‫ﻮﻥﻧ‬ ‫ﻜ‬ ‫ﻴ‬ ‫ﺍﺳ‬ ‫ﺬ‬ ‫ﺎ ) ‪.)‪cout << operate (x.)‪return (a*b‬‬ ‫}‬ ‫)‪float operate (float a. float b‬‬ ‫{‬ ‫.‬ﻫ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻔ‬ ‫ﻠ‬ ‫ﺘ‬ ‫ﻭﻣﺨ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻴ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻉ‬ ‫ﻮ‬ ‫ﻧ‬ ‫ﺍﻻ‬ ‫ﻪ‬ ‫ﻔ‬ ‫ﻠ‬ ‫ﺘ‬ ‫ﺎﻣﺨ‬ ‫ﻬ‬ ‫ﺗ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻧﺖﺑ‬ ‫ﺎ‬ ‫ﺍﻛ‬ ‫ﺫ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﺍﻻﺳ‬ ‫ﻔﺲ‬ ‫ﺎﻥﻧ‬ ‫ﺘ‬ ‫ﻔ‬ ‫ﻠ‬ ‫ﺘ‬ ‫ﺎﻥﻣﺨ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺬﺩ‬ ‫ﺎﺧ‬ ‫ﺍﻥﺗ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﻓﻲ ‪c++‬ﻳ‬ ‫ﺎ‬ ‫ﻫ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﻭﻋ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ﻨ‬ ‫ﺮﻯﺑ‬ ‫ﺍﻻﺧ‬ ‫ﻠﻒﻋﻦ‬ ‫ﺘ‬ ‫ﻪﺗﺨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻧﺖﻛﻞﺩ‬ ‫ﺎ‬ ‫ﺍﻛ‬ ‫ﺫ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﻩﺩ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﻢ‬ ‫ﺍﻻﺳ‬ ‫ﻔﺲ‬ ‫ﻌﻄﻲﻧ‬ ‫ﺍﻥﺗ‬ ‫ﻊ‬ ‫ﻴ‬ ‫ﺘﻄ‬ ‫ﻧﻚﺗﺴ‬ ‫ﺍ‬ ‫ﻨﻲ‬ ‫ﻌ‬ ‫ﻳ‬ ‫ﺜﻼ‪:‬‬ ‫ﻣ‬ ‫‪10‬‬ ‫‪2. ( int b = 2‬ﻟ‬ ‫ﻬ‬ ‫ﻔ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺎﻥﺗ‬ ‫ﻴﺚﻛ‬ ‫ﻪﺣ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻳﻒﺍ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺎﻓﻲﺗ‬ ‫ﻘ‬ ‫ﺒ‬ ‫ﺎﻣﺴ‬ ‫ﻫ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﺎﺣ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﻭﻱ ‪2‬ﻻ‬ ‫ﺎ‬ ‫ﺮﻯﺗﺴ‬ ‫ﻻﺧ‬ ‫ﺍ‬ ‫ﺗﺞ ) ‪.)‪return (a/b‬‬ ‫}‬ ‫)( ‪int main‬‬ ‫{‬ ‫.y‬‬ ‫. float‬ﻣ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺕﻣﻦ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻞﻣ‬ ‫ﺒ‬ ‫ﻘ‬ ‫ﺮﻯﺗ‬ ‫ﻻﺧ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﻞ‬ ‫ﺒ‬ ‫ﻘ‬ ‫ﺘﻲﺗ‬ ‫ﻟ‬ ‫ﻪﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪﻋﻲ‬ ‫ﺘ‬ ‫ﻪﻳﺴ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻪ ‪float‬ﻓ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﺎﺕﺣ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻧﺖﺍ‬ ‫ﺎ‬ ‫ﺍﻛ‬ ‫ﺫ‬ ‫ﺎ‬ ‫ءﻓ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﻪﻓﻲﺍ‬ ‫ﻠ‬ ‫ﺮﺳ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺕ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻝﺍ‬ ‫ءﻣﻦﺧﻼ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺎﺕﻣﻦ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﺬﻣ‬ ‫ﺎﺧ‬ ‫ﺘﻲﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪﻋﻲ‬ ‫ﺘ‬ ‫ﻪﻳﺴ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻴﺢﻓ‬ ‫ﻟﺼﺤ‬ ‫ﻮﻉﺍ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺎﺕﻣﻦﺍ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻧﺖ‬ ‫ﺎ‬ ‫ﺍﻛ‬ ‫ﺫ‬ ‫ﺎﺍ‬ ‫ﻣ‬ ‫ﻘﻲ ‪.

(overloaded‬‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﺘﺤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻳ‬ ‫ـ )ﺯ‬ ‫ﻤﻰﺑ‬ ‫ﺎﻳﺴ‬ ‫ﺍﻣ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﻢ ‪.h‬‬ ‫)‪long factorial (long a‬‬ ‫{‬ ‫)‪if (a > 1‬‬ ‫.‪cin >> number‬‬ ‫.‬ﺑ‬ ‫ﻬ‬ ‫ﻴﻦﻟ‬ ‫ﺘ‬ ‫ﻠ‬ ‫ﺍﺧ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻴﻦﺍ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﺏ‬ ‫ﻞﺿ‬ ‫ﺎﺻ‬ ‫ﻪﺣ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺪﻗ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﻪﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺪﻋﻰ؛ﻫ‬ ‫ﺘ‬ ‫ﺗﺴ‬ ‫ﻬﻲ‬ ‫ﻟﻰﻓ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﻪﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻒﻋﻦ‬ ‫ﺘ‬ ‫ﻞﻣﺨ‬ ‫ﻤ‬ ‫ﺩﻱﻋ‬ ‫ﺆ‬ ‫ﻫﻲﺗ‬ ‫ﺪﻋﻰﻭ‬ ‫ﺘ‬ ‫ﺘﺴ‬ ‫ﺘﻲﺳ‬ ‫ﻟ‬ ‫ﻪﻫﻲﺍ‬ ‫ﻴ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺎﻥﺍ‬ ‫ﺍﻓ‬ ‫ﺬ‬ ‫ﻮﻉ ‪.‬ﻟ‬ ‫ﻴ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﻠﻰﺍ‬ ‫ﻟﻰﻋ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﻪﺍ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﻘﺴ‬ ‫ﺗ‬ ‫ﻞ ‪.)‪cout << number << "! = " << factorial (number‬‬ ‫.))‪return (a * factorial (a-1‬‬ ‫‪else‬‬ ‫.‫‪Compiler_x@yahoo. int‬ﻟ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺎﻣﻦﺍ‬ ‫ﻤ‬ ‫ﻫ‬ ‫ﺮ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻢﺗ‬ ‫ﺎﻥﺗ‬ ‫ﺘ‬ ‫ﻠ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﻦ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻥ‬ ‫ﻪ ‪operate‬ﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻝﻟ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﻓﻲﺍ‬ ‫ﻞ‬ ‫ﺮﺳ‬ ‫ﻣﺞﻳ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻧﻲﻓﻲ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺎﺍ‬ ‫ﻤ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﺎ ‪.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪15‬‬ ‫ﺘﻲ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰﻫﻲ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺎﻥﺍ‬ ‫ﺍﻓ‬ ‫ﺬ‬ ‫ﻮﻉ ‪.)‪return (1‬‬ ‫}‬ ‫)( ‪int main‬‬ ‫{‬ ‫." ‪cout << "Please type a number:‬‬ ‫.‬ﻭ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﻔﺲ‬ ‫ﻨ‬ ‫ﻴﻦﺑ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﺔ‬ ‫ﻠ‬ ‫ﺍﺧ‬ ‫ﺪ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪Recursive functions‬‬ ‫ﺪ‬ ‫ﻧﻚﺗﺠ‬ ‫ﺃﻱﺍ‬ ‫ﺎ)‬ ‫ﻬ‬ ‫ﻠ‬ ‫ﺍﺧ‬ ‫ﺎﻣﻦﺩ‬ ‫ﻬ‬ ‫ﻔﺴ‬ ‫ﻨ‬ ‫ﺔﻟ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻠﺨﺺﻓﻲﺍﺳ‬ ‫ﺘ‬ ‫ﻫﻲﺗ‬ ‫ﺔﻭ‬ ‫ﺜ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﻟﺤ‬ ‫ﺔﺍ‬ ‫ﻣﺠ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺎﺕﺍ‬ ‫ﻐ‬ ‫ﺔﻓﻲﻟ‬ ‫ﻴ‬ ‫ﺎﺻ‬ ‫ﻟﺨ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺮﺕﻫ‬ ‫ﻬ‬ ‫ﻇ‬ ‫ﻴﺐ‬ ‫ﺗ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﺭﺑ‬ ‫ﺮ‬ ‫ﻜ‬ ‫ﺘ‬ ‫ءﻣ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻟﻰﺍﺳ‬ ‫ﺎﺝﺍ‬ ‫ﺘ‬ ‫ﺘﻲﺗﺤ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﻤﺴ‬ ‫ﻟ‬ ‫ﻌﺾﺍ‬ ‫ﻞﺑ‬ ‫ﺓﻓﻲﺣ‬ ‫ﺪ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﺔﻣ‬ ‫ﻴ‬ ‫ﺎﺻ‬ ‫ﻟﺨ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﺔ (ﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻔﺲ‬ ‫ﻞﻧ‬ ‫ﺍﺧ‬ ‫ﺔﺩ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺎﻣﻦ‬ ‫ﻫ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﺒﺤﺚﻭﻏ‬ ‫ﻟ‬ ‫ﺎﺕﺍ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻟﻲﻭﻋ‬ ‫ﺯ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪﻱﻭ‬ ‫ﺎﻋ‬ ‫ﺘﺼ‬ ‫ﻟ‬ ‫ﻴﺐﺍ‬ ‫ﺗ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺯﻭ‬ ‫ﺮ‬ ‫ﻔ‬ ‫ﻟ‬ ‫ﺎﺕﺍ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻭﻋ‬ ‫ﺩﺍ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻭﺏ‬ ‫ﺮ‬ ‫ﺩﻣﻀ‬ ‫ﺎ‬ ‫ﻳﺠ‬ ‫ﺍ‬ ‫ﺎﺕ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻞﻋ‬ ‫ﺜ‬ ‫ﻴﻦﻣ‬ ‫ﻌ‬ ‫ﻣ‬ ‫ﺔ‪.‬‬ ‫ﺒ‬ ‫ﺗ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓﻭ‬ ‫ﺭ‬ ‫ﺮ‬ ‫ﻜ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺕ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‪:‬‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﺎ‬ ‫ﻮﻥﺑ‬ ‫ﻜ‬ ‫ﺎﺿﻲﻳ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﺎﻥ‬ ‫ﺩ ‪5‬ﻓ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﻭﺏﺍ‬ ‫ﺮ‬ ‫ﺩﻣﻀ‬ ‫ﺎ‬ ‫ﻳﺠ‬ ‫ﺜﻼﻻ‬ ‫ﻤ‬ ‫ﻓ‬ ‫‪5!= 5 * 4 * 3 * 2 * 1‬‬ ‫ﺓ‬ ‫ﺭ‬ ‫ﻮ‬ ‫ﻟﺼ‬ ‫ﺎ‬ ‫ﺘﺐﺑ‬ ‫ﻜ‬ ‫ﺍﻥﻳ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﻳ‬ ‫ﻭ‬ ‫)!‪5!= 5 * (4‬‬ ‫ﺓ‪:‬‬ ‫ﺭ‬ ‫ﻮ‬ ‫ﻟﺼ‬ ‫ﺎ‬ ‫ﺘﺐﺑ‬ ‫ﻜ‬ ‫ﻭﺏ ‪4‬ﻳ‬ ‫ﺮ‬ ‫ﻻﻥﻣﻀ‬ ‫‪4!= 4 * 3 * 2 *1‬‬ ‫ﺘﺐ ‪(1!)*2‬‬ ‫ﻜ‬ ‫ﻭﺏ ‪2‬ﻳ‬ ‫ﺮ‬ ‫ﺍﻥﻣﻀ‬ ‫ﺘﺐ ‪(2!)*3‬ﻭ‬ ‫ﻜ‬ ‫ﺍﻥﻳ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﻭﺏ ‪3‬ﻳ‬ ‫ﺮ‬ ‫ﺍﻥﻣﻀ‬ ‫ﺘﺐ ‪(3!) *4‬ﻭ‬ ‫ﻜ‬ ‫ﺍﻥﻳ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﻭﺏ ‪4‬ﻳ‬ ‫ﺮ‬ ‫ﺍﻥﻣﻀ‬ ‫ﻭ‬ ‫ﻭﺏ ‪5‬‬ ‫ﺮ‬ ‫ﺪﻣﻀ‬ ‫ﻜﺴﻲﻧﺠ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﺾ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﺎﻋ‬ ‫ﺑ‬ ‫ﻭﺏ ‪1=1‬ﻭ‬ ‫ﺮ‬ ‫ﺍﻥﻣﻀ‬ ‫ﻭ‬ ‫‪Please type a number: 5‬‬ ‫‪5! = 120‬‬ ‫‪// factorial calculator‬‬ ‫>‪#include <iostream. float‬ﻟ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﻦﻣﻦ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻣ‬ ‫ﺩ‬ ‫ﻮ‬ ‫ﻮﺟ‬ ‫ﺎﻟ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻠ‬ ‫ﺮﺳ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺎﺕﺍ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﻉ‬ ‫ﻠﻰﻧ‬ ‫ﺪﻋ‬ ‫ﻤ‬ ‫ﺘ‬ ‫ﻌ‬ ‫ﻪ ‪operate‬ﻳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻞﺍ‬ ‫ﻤ‬ ‫ﺪﻋ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﺍﺗﺤ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﻪ ‪.‪long number‬‬ ‫.‪return 0‬‬ ‫}‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻔﺲ‬ ‫ﻞﻧ‬ ‫ﺍﺧ‬ ‫ﺔ ‪factorial‬ﻣﻦﺩ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ءﻟ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺩ‬ ‫ﻮ‬ ‫ﺎﺗﻼﺣﻆﻭﺟ‬ ‫ﻨ‬ ‫ﻫ‬ ‫ﺜﻼ‪٬‬‬ ‫ﺔﻣ‬ ‫ﻌ‬ ‫ﺑ‬ ‫ﺭ‬ ‫ﻜﻦﺍ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺮ ‪number‬ﻭ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻠ‬ ‫ﺔﻟ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻝﻗ‬ ‫ﺎ‬ ‫ﺩﺧ‬ ‫ﺍ‬ ‫ﻨﻚ‬ ‫ﺮﻣ‬ ‫ﺘﻈ‬ ‫ﻨ‬ ‫ﻴ‬ ‫ﻣﺞﺳ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻮﺍﻥ‬ ‫ﻣﺞﻫ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺪﺗ‬ ‫ﻨ‬ ‫ﻞﻋ‬ ‫ﻴﺤﺼ‬ ‫ﺬﻱﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻫ‬ ‫ﺮ ‪a‬ﻭ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺭﺍ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺗ‬ ‫ﺔ ‪factorial‬ﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﺮﻟ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺔﻫ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻞﻗ‬ ‫ﺮﺳ‬ ‫ﺘ‬ ‫ﻴﺚﺳ‬ ‫ﺮﺣ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﻭﺏﻟ‬ ‫ﺮ‬ ‫ﻤﻀ‬ ‫ﻟ‬ ‫ﺩﺍ‬ ‫ﺎ‬ ‫ﻳﺠ‬ ‫ﻢﺍ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻭﺳ‬ ‫ﺗﻲ‪:‬‬ ‫ﻻ‬ ‫ﺍ‬ ‫ﺎﺣﺴﺐ‬ ‫ﻬ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﺍﺑ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺳ‬ .

)‪cout<<power(x.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪16‬‬ ‫ﻮ‬ ‫ﺍﻥ !‪3‬ﻫ‬ ‫ﻻﻭ‬ ‫ﻭ‬ ‫ﺩ !‪3‬ﺍ‬ ‫ﺎ‬ ‫ﻳﺠ‬ ‫ﺎﺝﻻ‬ ‫ﺘ‬ ‫ﺎﻧﺤ‬ ‫ﻨ‬ ‫ﻧ‬ ‫ﻻﺍ‬ ‫ﻮ) !‪(4* 3‬ﺍ‬ ‫ﺜﻼﻫ‬ ‫ﺔﻣ‬ ‫ﻌ‬ ‫ﺑ‬ ‫ﺭ‬ ‫ﻻ‬ ‫ﻭﺏﺍ‬ ‫ﺮ‬ ‫ﺍﻥﻣﻀ‬ ‫ﺎﺿﻲ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﺎﻓﻲ‬ ‫ﻨ‬ ‫ﻠ‬ ‫ﺎﻗ‬ ‫ﺣﺴﺐﻣ‬ ‫ﺪ‬ ‫ﺍﺣ‬ ‫ﻭﻱﻭ‬ ‫ﺎ‬ ‫ﺍﻥ !‪1‬ﻳﺴ‬ ‫ﻮ )!‪( 2 * 1‬ﻭ‬ ‫ﺍﻥ !‪2‬ﻫ‬ ‫ﺩ !‪2‬ﻭ‬ ‫ﺎ‬ ‫ﻳﺠ‬ ‫ﻟﻰﺍ‬ ‫ﺎﺝﺍ‬ ‫ﺘ‬ ‫ﺎﻧﺤ‬ ‫ﻨ‬ ‫ﺎﻫ‬ ‫ﻳﻀ‬ ‫)!‪(3*2‬ﺍ‬ ‫ﻝ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ءﺍ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ءﺍ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺍﺧ‬ ‫ﻧﻲﻣﻦﺩ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ءﺍ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫)‪factorial (5) = 5 * factorial (4‬‬ ‫)‪factorial (4) = 4 * factorial(3‬‬ ‫ﻲ )‪factorial (3)= 3 * factorial(2‬‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺍﺧ‬ ‫ﻟﺚﻣﻦﺩ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﻟﺚ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺍﺧ‬ ‫ﻊﻣﻦﺩ‬ ‫ﺑ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫)‪ factorial (2) = 2 * factorial (1‬ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﻗﻒﻋﻦﺍ‬ ‫ﻮ‬ ‫ﺘ‬ ‫ﻨ‬ ‫ﺎﺳ‬ ‫ﻨ‬ ‫ﻫ‬ ‫ﻊﻭ‬ ‫ﺑ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺍﺧ‬ ‫ﻣﺲﻣﻦﺩ‬ ‫ﺎ‬ ‫ﻟﺨ‬ ‫ءﺍ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫‪factorial (1) =1‬‬ ‫ﻝ‬ ‫ﻭ‬ ‫ﻟﻰﺍ‬ ‫ﻞﺍ‬ ‫ﺘﻰﻧﺼ‬ ‫ﺎﺣ‬ ‫ﻴ‬ ‫ﻳﺠ‬ ‫ﺭ‬ ‫ﺪ‬ ‫ﻭﺏﺗ‬ ‫ﺮ‬ ‫ﻤﻀ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﺏ‬ ‫ﻢﺣﺴ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻠﻰﺳ‬ ‫ﻻﻋ‬ ‫ﻟﻰﺍ‬ ‫ﻞﺍ‬ ‫ﻔ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ءﻣﻦ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻞﺍﺳ‬ ‫ﻜﺴﻲﻋﻦﻛ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﺾ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻭﻋ‬ ‫ﺔ‪.‬‬ ‫ﺑ‬ ‫ﻮ‬ ‫ﻠ‬ ‫ﻤﻄ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺓﺍ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﺎﻋ‬ ‫ﺎﺑ‬ ‫ﻨ‬ ‫ﺔﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻬﻲﺍ‬ ‫ﺘ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ءﻓ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﺘ‬ ‫ﺘﺴ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﺎﻭ‬ ‫ﺮﻁﻣ‬ ‫ﺪﺷ‬ ‫ﻨ‬ ‫ﻞﻋ‬ ‫ﺍﺧ‬ ‫ﺪ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ءﺍ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﻗﻒﺍ‬ ‫ﻮ‬ ‫ﺘ‬ ‫ﺍﻥﻳ‬ ‫ﻴﺚﻳﺠﺐ‬ ‫ﺔﺣ‬ ‫ﻠ‬ ‫ﺍﺧ‬ ‫ﺪ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻝﺍ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻊ‬ ‫ﺭﻣ‬ ‫ﺬ‬ ‫ﺔﻭﺣ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻌ‬ ‫ﻞﺑ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﺍﻥﻧ‬ ‫ﻳﺠﺐ‬ ‫ﺔ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ءﺟﺴ‬ ‫ﺎ‬ ‫ﺍﺧﻄ‬ ‫ﺔ‬ ‫ﺒ‬ ‫ﺒ‬ ‫ﺪﻯﻣﺴ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺭﺝ‬ ‫ﺎ‬ ‫ﻢﺧ‬ ‫ﻴ‬ ‫ﻟﻰﻗ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻔﺴ‬ ‫ءﻧ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺔﻓﻲﺍﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺍﺧ‬ ‫ﺎﻝ‬ ‫ﺜ‬ ‫ﻣ‬ ‫‪8‬‬ ‫‪// factorial calculator‬‬ ‫>‪#include <iostream.‪int x=2.)))‪return (a * power(a.‪return 0‬‬ ‫}‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻔﺴ‬ ‫ﺪﻋﻲﻧ‬ ‫ﺘ‬ ‫ﺔﺗﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻴﺚﻫ‬ ‫ﻻﺱ( ‪b‬ﺣ‬ ‫ﺍ‬ ‫ﺓ)‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻠ‬ ‫ﻮﻉﻟ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﺮ ‪a‬ﻣ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻮﻉﻟ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺓﺍ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺔﺗﺠ‬ ‫ﻠ‬ ‫ﺍﺧ‬ ‫ﺪ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﻜﺴﻲ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﺾ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﺎﻳ‬ ‫ﻫ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻟﻰ ‪b=1‬ﻋ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﻮ‬ ‫ﻮﺻ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﻐ‬ ‫ﺪﻟ‬ ‫ﺍﺣ‬ ‫ﺭﻭ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻘ‬ ‫ﻤ‬ ‫ﻠﺖﺑ‬ ‫ﻮﻥ ‪b‬ﻗ‬ ‫ﻜ‬ ‫ﻟﻲﺗ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺪﺍ‬ ‫ﻨ‬ ‫ﺍﺕ ‪b‬ﻭﻋ‬ ‫ﺮ‬ ‫ﺩﻣ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﺑ‬ ‫ﺘﻲ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻟﻰﺍ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﻮ‬ ‫ﻌ‬ ‫ﻴ‬ ‫ﺔﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺗﺞﻫ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺎﻭ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺘﻲﺍﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﻮﺽﻋ‬ ‫ﻌ‬ ‫ﻴ‬ ‫ﺗﺞﺳ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺎﻫ‬ ‫ﻬ‬ ‫ﺗﺞﻟ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺪ ‪a‬ﻛ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻭﺳ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻜ‬ ‫ﻫ‬ ‫ﺎﻭ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﻪ ‪2^3‬‬ ‫ﻧ‬ ‫ﺃﻱﺍ‬ ‫ﺎﺱ ‪3‬‬ ‫ﻮﻉﻟﻼﺳ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﻢ ‪2‬ﻣ‬ ‫ﻗ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓ‬ ‫ﻮ‬ ‫ﺩﻗ‬ ‫ﺎ‬ ‫ﻳﺠ‬ ‫ﺎﺿﻲﻻ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻟﺤ‬ ‫ﺍ‬ .y‬‬ ‫.y=3‬‬ ‫.(b-1‬‬ ‫}‬ ‫)( ‪int main‬‬ ‫{‬ ‫.int b‬‬ ‫{‬ ‫)‪if (b<=1‬‬ ‫.h‬‬ ‫)‪int power (int a.‫‪Compiler_x@yahoo.‪return a‬‬ ‫‪else‬‬ ‫.

3)=2 * power(2.1)=2‬‬ ‫ﻻﺱﻓﻲ‬ ‫ﻞﺍ‬ ‫ﺪﺧ‬ ‫ﻻﻳ‬ ‫ﻻﺱ ‪3‬ﻭ‬ ‫ﺍﺕﺍ‬ ‫ﺮ‬ ‫ﺩﻣ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﺑ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓﻣﻦ‬ ‫ﺪ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺔﺍ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺎﺱ ‪2‬ﻓﻲﺍ‬ ‫ﻻﺳ‬ ‫ﺮﺏﺍ‬ ‫ءﻧﻀ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﻞ‬ ‫ﺍﻥﻓﻲﻛ‬ ‫ﻧﻼﺣﻆ‬ ‫ﻘﻂ‪."‪if ((a%2)==0) cout << "Number is even.)‪else odd (a‬‬ ‫}‬ ‫)( ‪int main‬‬ ‫{‬ ‫.)‪} while (i!=0‬‬ ‫.‬‬ ‫ﺭﻓ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻜ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﺕ‬ ‫ﺮ‬ ‫ﺩﻣ‬ ‫ﺪ‬ ‫ﻮﻋ‬ ‫ﻪﻫ‬ ‫ﻨ‬ ‫ﺮﺽﻣ‬ ‫ﻐ‬ ‫ﻟ‬ ‫ﺔﻻﻥﺍ‬ ‫ﻴ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﻟﺤﺴ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻝ ) ‪(prototype‬‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﺢﻋﻦ‬ ‫ﺮ‬ ‫ﺘﺼ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪Declaring functions‬‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﻻ‬ ‫ﻬﻲﺩ‬ ‫ﺔﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺃﻱﺩ‬ ‫ﺔ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﺪﻛ‬ ‫ﻨ‬ ‫ﺔﻋ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﺍ‬ ‫ﻡ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺍﻥﺗﺴ‬ ‫ﺘﻲﻟﻚﻫﻲ‬ ‫ﻴﺤ‬ ‫ﻧﺼ‬ ‫ﻝﻭ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍﻓﻲﺍ‬ ‫ﺪ‬ ‫ﻢﺟ‬ ‫ﻬ‬ ‫ﻴﻦﺷﺊﻣ‬ ‫ﺑ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﺩ‬ ‫ﻭ‬ ‫ﺎﺍ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﺧ‬ ‫ﻴﻦ‬ ‫ﺋ‬ ‫ﺪ‬ ‫ﺘ‬ ‫ﺒ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﻴﻦﺍ‬ ‫ﻣﺠ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻮﺻ‬ ‫ﻣﺞﺧﺼ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻔ‬ ‫ﺪﻻﻳ‬ ‫ءﻗ‬ ‫ﺎ‬ ‫ﻓﻲﺍﺧﻄ‬ ‫ﺗﻼ‬ ‫ﻣﺞﻭ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻠ‬ ‫ﻮﻱﻟ‬ ‫ﻘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺒﻚ‬ ‫ﻟﺴ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﻋ‬ ‫ﻟﻲ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﻝﺍ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﻚ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪// declaring functions prototypes‬‬ ‫>‪#include <iostream.‪cin >> i‬‬ ‫." )‪cout << "Type a number: (0 to exit‬‬ ‫.h‬‬ ‫)‪void odd (int a‬‬ ‫{‬ ‫.2‬‬ ‫)‪power(2.\n‬‬ ‫.\n‬‬ ‫."‪if ((a%2)!=0) cout << "Number is odd.‪int i‬‬ ‫{ ‪do‬‬ ‫.)‪else even (a‬‬ ‫}‬ ‫)‪void even (int a‬‬ ‫{‬ ‫.)‪odd (i‬‬ ‫.‫‪Compiler_x@yahoo.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪17‬‬ ‫‪2 ^3 = 2 * 2 * 2 = 8‬‬ ‫ﺔ‬ ‫ﻠ‬ ‫ﺍﺧ‬ ‫ﺪ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﺍﺧ‬ ‫ﻞﺩ‬ ‫ﻴ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫)‪power(2.1‬‬ ‫‪power(2.‪return 0‬‬ ‫}‬ .2)= 2 * power (2.

‬ﻓ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺑﻖﻋﻦ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﻝﺍ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻓﻲ‬ ‫ﻮﻉ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻣﻦ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺬﺑ‬ ‫ﺎﺧ‬ ‫ﺗ‬ ‫ﻮﻉ ‪void‬ﻭ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺎ ‪even‬ﻣﻦﺍ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﺔﺍﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻙﺩ‬ ‫ﻨ‬ ‫ﺍﻥﻫ‬ ‫ﺮ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻠ‬ ‫ﻤﺤﺖﻟ‬ ‫ﻟ‬ ‫ﻧﻚﺍ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﻮﻟ‬ ‫ﻞﻫ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﺎ ‪.‬‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻊﻋ‬ ‫ﺒ‬ ‫ﻴﻄ‬ ‫ﻪﺳ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻭﻱ ‪0‬ﻓ‬ ‫ﺎ‬ ‫ﻳﺴ‬ ‫ﻠﻰ ‪2‬ﻻ‬ ‫ﺔﻋ‬ ‫ﻤ‬ ‫ﻘﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻗﻲ‬ ‫ﺎ‬ ‫ﺎﻥﺑ‬ ‫ﺍﻛ‬ ‫ﺫ‬ ‫ﺎ‬ ‫ﻓ‬ ‫ﻊ‬ ‫ﻮﺏﻣ‬ ‫ﻠ‬ ‫ﻻﺳ‬ ‫ﻔﺲﺍ‬ ‫ﻨ‬ ‫ﻭﺟﻲﺑ‬ ‫ﻮﺯ‬ ‫ﻞﻫ‬ ‫ﺪﺧ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻗ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍﻥﺍ‬ ‫ﻞ‬ ‫ﺭﻫ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺮﻯ ‪even‬ﻻﺧ‬ ‫ﻻﺧ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺪﻋﻲﺍ‬ ‫ﺘ‬ ‫ﻴﺴ‬ ‫ﻪﺳ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻟﻚﻓ‬ ‫ﺮﺫ‬ ‫ﻴ‬ ‫ﺔﻏ‬ ‫ﻤ‬ ‫ﻘﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻯ ‪odd‬‬ ‫ﻻﺧ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺪﻋﻲﺍ‬ ‫ﺘ‬ ‫ﺘﺴ‬ ‫ﺔﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺎﻥﺍ‬ ‫ﻭﺟﻲﻓ‬ ‫ﻢﺯ‬ ‫ﻗ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻜﻦ‬ ‫ﻢﻳ‬ ‫ﺍﻟ‬ ‫ﺫ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻧ‬ ‫ﺎﺍ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺗﻼﺣﻆ‬ ‫ﺔﻭ‬ ‫ﺎﻋ‬ ‫ﺒ‬ ‫ﻟﻄ‬ ‫ﺍ‬ ‫ﺓ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﺮﻁﻭﻋ‬ ‫ﻟﺸ‬ ‫ﺍ‬ ‫ﺘﻼﻑ‬ ‫ﺍﺧ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻠ‬ ‫ﻓﻀ‬ ‫ﺍ‬ ‫ﺘﻲ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﺍ‬ ‫ﻫﻲ‬ ‫ﻴﻦ ‪) ctrl+F9‬ﻭ‬ ‫ﺎﺣ‬ ‫ﺘ‬ ‫ﻔ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻠﻰ‬ ‫ﻐﻂﻋ‬ ‫ﻭﺍﺿ‬ ‫ﺍ‬ ‫ﺔ ‪debug‬‬ ‫ﻤ‬ ‫ﺋ‬ ‫ﺎ‬ ‫ﺮ ‪Run‬ﻣﻦﻗ‬ ‫ﻣ‬ ‫ﻻ‬ ‫ﺭﺍ‬ ‫ﺎ‬ ‫ﻴ‬ ‫ﺘ‬ ‫ﺎﺧ‬ ‫ﻢﺑ‬ ‫ﻻﻥﻗ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺎﻙﺍﺳ‬ ‫ﻨ‬ ‫ﺍﻥﻫ‬ ‫ﻴﻦ‬ ‫ﺒ‬ ‫ﺎﺗ‬ ‫ﺔﺧﻄ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﺮﺭﺳ‬ ‫ﻬ‬ ‫ﺘﻈ‬ ‫ﻞﻭﺳ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻣﺞﻟﻦﻳ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻞﻓ‬ ‫ﻣ‬ ‫ﻻ‬ ‫ﺔﺍ‬ ‫ﺒ‬ ‫ﻴ‬ ‫ﺎﺏﺑﺨ‬ ‫ﺗﺼ‬ ‫ﻜﻦ ‪..‫‪Compiler_x@yahoo.‪int x‬‬ ‫.‬‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺔﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻭﻥﺟﺴ‬ ‫ﺪ‬ ‫ﻠﻲﺑ‬ ‫ﻻﺻ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻒ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﻮﺗ‬ ‫ﻘﻂﻫ‬ ‫ﺔﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻴﻂﻟ‬ ‫ﻳﻒﺑﺴ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺮﺗ‬ ‫ﻛ‬ ‫ﺬ‬ ‫ﻤﺖﺑ‬ ‫ﻧﻚﻗ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﺎﻟ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﺪﺙﻋ‬ ‫ﺮﻳﺤ‬ ‫ﻣ‬ ‫ﻻ‬ ‫ﺍﺍ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﺔﻓ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺎﺍ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺔ‪. (ﻟ‬ ‫ﻮﻃ‬ ‫ﻘ‬ ‫ﻨ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓ‬ ‫ﺯ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻔ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻮﻉﺑ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﻮﻥﻣ‬ ‫ﻜ‬ ‫ﻳﻒﻳ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ءﺍ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺍﺟ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﺑﻖﺑ‬ ‫ﺎ‬ ‫ﻟﺴ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﻚ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﻳﻒﻭﺟﺴ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺔﻣﻦﺳﻄ‬ ‫ﻠ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﺘﺐﻛ‬ ‫ﻜ‬ ‫ﺘ‬ ‫ﺔﻭﺳ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻌ‬ ‫ﻊﺑ‬ ‫ﻮﺿ‬ ‫ﺘ‬ ‫ﺳ‬ ‫ﺪ‬ ‫ﻴ‬ ‫ﻛ‬ ‫ﺎ‬ ‫ﻞﺗ‬ ‫ﻜ‬ ‫ﻞﺑ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻴ‬ ‫ﻩﺳ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﻪﻭ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻋ‬ ..‬‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻝ ‪.‬؟‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﻮﻥﺍ‬ ‫ﻨ‬ ‫ﻞﺟﻦﺟ‬ ‫؟ﻫ‬ ‫ﻟﻚ؟‬ ‫ﺎﻓﻲﺫ‬ ‫ﻟﺨﻄ‬ ‫ﺍ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﻓ‬ ‫ﻟﻲ ‪:‬‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻓﻲ‬ ‫ﺔ ‪odd‬‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﻪ‬ ‫ﻟ‬ ‫ﻮ‬ ‫ﺪﻭﺻ‬ ‫ﻨ‬ ‫ﻪﻭﻋ‬ ‫ﻠ‬ ‫ﻔ‬ ‫ﺍﺳ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻠﻰﺍ‬ ‫ﺍﻋ‬ ‫ﻣﺞﻣﻦ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻔﺴ‬ ‫ﺔﺗ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺮ ‪compiler‬ﻳ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﺍﻥ‬ ‫ﻞ‬ ‫ﺒ‬ ‫ﻢﻗ‬ ‫ﺔ ‪even‬ﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ءﻟ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻜﻦﻫ‬ ‫ﻟ‬ ‫ﺔ (ﻭ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﺔﻭﺳ‬ ‫ﻴﺤ‬ ‫ﻻﻥ ﺻﺤ‬ ‫ﺪﺍ‬ ‫ﺔﻟﺤ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻨﻈ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ ‪) even‬‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ءﻟ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﻴ‬ ‫ﺪﻓ‬ ‫ﻭﺟ‬ ‫ﻡ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻢﺗ‬ ‫ﻣﻦﺛ‬ ‫ﺮﻭ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻟﻰﻣ‬ ‫ﺔﺍ‬ ‫ﻤ‬ ‫ﻴ‬ ‫ﺩﻗ‬ ‫ﺎ‬ ‫ﻨ‬ ‫ﺎﺳ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻧﻚﺗ‬ ‫ﺎ‬ ‫ﻛ‬ ‫ﺔ ‪even‬ﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻻﻋﻼﻥﻋﻦ‬ ‫ﻪﺍ‬ ‫ﻴ‬ ‫ﻢﻓ‬ ‫ﺬﻱﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻥ‬ ‫ﻜ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻳﺼ‬ ‫ﺜﻼ‬ ‫ﺮﻣ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻳﻒﻫ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﺑ‬ ‫)(‪Int main‬‬ ‫{‬ ‫.‬ﻻ‬ ‫ﻟ‬ ‫ﻣﺞﻭ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻴ‬ ‫ﻔ‬ ‫ﻨ‬ ‫ﺘ‬ ‫ﺎ (ﻟ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻴﺤ‬ ‫ﺓ ﺻﺤ‬ ‫ﺭ‬ ‫ﻮ‬ ‫ﺎﺑﺼ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﺎﺑ‬ ‫ﻨ‬ ‫ﻤ‬ ‫ﻗ‬ ‫ﺔ ‪even‬ﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻒ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﺎﺑ‬ ‫ﻨ‬ ‫ﻤ‬ ‫ﺪﻗ‬ ‫ﻘ‬ ‫ﻳﺐﻟ‬ ‫ﺮ‬ ‫ﺍﺷﺊﻏ‬ ‫ﺬ‬ ‫ﻴﺲﻫ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔﻫﻲ ‪.‬‬ ‫ﻐ‬ ‫ﻟ‬ ‫ﺍﺍ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﻴﻦﻟ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﺭﻟ‬ ‫ﺮ‬ ‫ﻤ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮ‪a‬‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻠ‬ ‫ﺭﻟ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺍﺧ‬ ‫ﺔ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺍﺿﺢﺗ‬ ‫ﻮﻭ‬ ‫ﺎﻫ‬ ‫ﻤ‬ ‫ﻛ‬ ‫ﺩﻱﻭ‬ ‫ﺮ‬ ‫ﻞﻓ‬ ‫ﺪﺧ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻗ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍﻥ‬ ‫ﻞ‬ ‫ﺭﻫ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﻟﻰ ‪ood‬ﻻﺧ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻗﻲ‬ ‫ﺎ‬ ‫ﺎﻥﺑ‬ ‫ﻮﻛ‬ ‫ﺎﻟ‬ ‫ﻣ‬ ‫ﺍ‬ ‫‪٬‬‬ ‫ﺩﻱ(‬ ‫ﺮ‬ ‫ﻢﻓ‬ ‫ﻗ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓ ‪) Number is odd.‬‬ ‫ﻨ‬ ‫ﺣﺴ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻮﻯﺍ‬ ‫ﺘ‬ ‫ﻩﻋﻦﻣﺤ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﺘﺨ‬ ‫ﻧﻚﺳ‬ ‫ﺍ‬ ‫ﻻﻥﻭ‬ ‫ﺎﺍ‬ ‫ﻫ‬ ‫ﺍ‬ ‫ﻮ‬ ‫ﺘ‬ ‫ﻣﺤ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻞﻫ‬ ‫ﻴ‬ ‫ﺎﺻ‬ ‫ﻔ‬ ‫ﺮﻋﻦﺗ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺭﺍ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﺎﺧ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻨﻚﻟﻦﺗ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﻴﺢﻭ‬ ‫ﻟﺼﺤ‬ ‫ﺍ‬ ‫ﻌﺾ‬ ‫ﻣﺢﺑ‬ ‫ﺎ‬ ‫ﺘﺴ‬ ‫ﺔﺳﻲ‪++‬ﻣ‬ ‫ﻐ‬ ‫ﺮﻟ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﺭﻻﻥﻛ‬ ‫ﺪ‬ ‫ﻪﺻ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﻞﺭﺣ‬ ‫ﻜ‬ ‫ﺍﺑ‬ ‫ﺬ‬ ‫ﺮﺿﻚﻫ‬ ‫ﻞﻋ‬ ‫ﺒ‬ ‫ﻘ‬ ‫ﻴ‬ ‫ﻪﺳ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﻣﺞﻓ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺮﻣﻦﺍ‬ ‫ﺍﺧ‬ ‫ﺎﻥ‬ ‫ﻜ‬ ‫ﻓﻲﻣ‬ ‫ﺎﻭ‬ ‫ﻘ‬ ‫ﻻﺣ‬ ‫ﻟﺸﺊ ‪.‪x=4‬‬ ‫..‪cout<<x‬‬ ‫‪return 0‬‬ ‫}‬ ‫ﺪﺙ‬ ‫ﺬﻱﺣ‬ ‫ﻟ‬ ‫ﺮﺍ‬ ‫ﻣ‬ ‫ﻻ‬ ‫ﻔﺲﺍ‬ ‫ﺔﻧ‬ ‫ﻔ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﻢﺗ‬ ‫ﺘ‬ ‫ﻢﻳ‬ ‫ﺮﻟ‬ ‫ﻴ‬ ‫ﻐ‬ ‫ﺘ‬ ‫ﺎﻙﻣ‬ ‫ﻨ‬ ‫ﺍﻥﻫ‬ ‫ﻟﻰ‬ ‫ﺍﺍ‬ ‫ﺮ‬ ‫ﻴ‬ ‫ﻣﺞﻣﺸ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍﺍ‬ ‫ﺬ‬ ‫ﻠﻰﻫ‬ ‫ﺮﺽﻋ‬ ‫ﺘ‬ ‫ﻌ‬ ‫ﻴ‬ ‫ﺮﺳ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻟﺤ‬ ‫ﻩﺍ‬ ‫ﺬ‬ ‫ﻔﻲﻫ‬ ‫ﻓ‬ ‫ﻞ ‪... even‬‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺮﻣ‬ ‫ﻴ‬ ‫ﺔﻏ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻤﻦ‬ ‫ﻜ‬ ‫ﺔﺗ‬ ‫ﻠ‬ ‫ﻜ‬ ‫ﻤﺸ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻜﻦ‬ ‫ﻟ‬ ‫ﻢ ‪100/100‬ﻭ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﺮﺳ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺰﻱ‬ ‫ﻳ‬ ‫ﺰ‬ ‫ﺎﻋ‬ ‫؟‪٬‬ﻻﻳ‬ ‫؟‬ ‫ﺮ ‪.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪18‬‬ ‫ﻡ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﻳﺴ‬ ‫ﺔ ) ‪( %‬ﻭ‬ ‫ﻤ‬ ‫ﻘﺴ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻗﻲ‬ ‫ﺎ‬ ‫ﻞﺑ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﻡﻣ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺘﺨ‬ ‫ﺎﺳ‬ ‫ﻭﺟﻲﺑ‬ ‫ﻡﺯ‬ ‫ﺍ‬ ‫ﺩﻱ‬ ‫ﺮ‬ ‫ﻞﻓ‬ ‫ﺪﺧ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻢ‬ ‫ﻗ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﻤ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻣﺞﻳ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﻭﺽﺍﻥﻫ‬ ‫ﺮ‬ ‫ﻔ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﺽ ‪.‬‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﻒﻋﻦﺩ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺮﺗ‬ ‫ﻮﺳﻄ‬ ‫ﺮﻫ‬ ‫ﻟﺴﻄ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺍﻥﻫ‬ ‫ﻠﻰ‬ ‫ﺔﻋ‬ ‫ﻟ‬ ‫ﻻ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﺔ ) ..

" )‪cout << "Type a number: (0 to exit‬‬ ‫.h‬‬ ‫.‪cin >> i‬‬ ‫. int‬‬ ‫ﻣﺞ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺪﺍ‬ ‫ﻌ‬ ‫ﻝﺑ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻴﺐﺍ‬ ‫ﺗ‬ ‫ﺮ‬ ‫ﺗ‬ ‫ﺔﻭ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻳﺢﻋﻦ‬ ‫ﺮ‬ ‫ﺘﺼ‬ ‫ﻟ‬ ‫ﻴﻦﺍ‬ ‫ﻴﺐﺑ‬ ‫ﺗ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍﻋﻲﺍ‬ ‫ﺮ‬ ‫ﺍﻥﺗ‬ ‫ﻴﺠﺐ‬ ‫ﺔﻓ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﺔﺑ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺮﻣﻦﺩ‬ ‫ﺜ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﺪﻛ‬ ‫ﻨ‬ ‫*ﻋ‬ ‫ﺍ‪.)‪else odd (a‬‬ ‫}‬ ‫ﺮﻑ‬ ‫ﻌ‬ ‫ﻴ‬ ‫ﻣﺞﺳ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﺮﺟ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﺮﻟ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺗﻲ‬ ‫ﺎ‬ ‫ﺎﻳ‬ ‫ﻣ‬ ‫ﺪ‬ ‫ﻨ‬ ‫ﺎﻋ‬ ‫ﻨ‬ ‫ﻴﺚﻫ‬ ‫ﺎﺣ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻨ‬ ‫ﻞﻣ‬ ‫ﻜ‬ ‫ﻳﻒﻟ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺮﺍ‬ ‫ﻝﺑﺴﻄ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﺍﺳ‬ ‫ﻴﻦ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺎﻥﺍ‬ ‫ﻜ‬ ‫ﺪﺍﻥﻣ‬ ‫ﻫ‬ ‫ﺎ‬ ‫ﺘﺸ‬ ‫ﺳ‬ ‫ﺎﻣﻦ‬ ‫ﻳﻀ‬ ‫ﺎ ‪even‬ﺍ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﺮﻯﺍﺳ‬ ‫ﺔﺍﺧ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻙﺩ‬ ‫ﻨ‬ ‫ﺎﻫ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺪﻭ‬ ‫ﺍﺣ‬ ‫ﺮﻭ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺬﺑ‬ ‫ﺎﺧ‬ ‫ﻮﻉ ‪viod‬ﺗ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎ ‪odd‬ﻣﻦ‬ ‫ﻬ‬ ‫ﻤ‬ ‫ﺍﺳ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻙﺩ‬ ‫ﻨ‬ ‫ﺍﻥﻫ‬ ‫ﻴﻦ‬ ‫ﺗ‬ ‫ﺎ‬ ‫ﻮﻯﻫ‬ ‫ﺘ‬ ‫ﺮﻑﻣﺤ‬ ‫ﻌ‬ ‫ﻪﻻﻳ‬ ‫ﻨ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﻴﻦ ‪odd‬ﻭ ‪even‬ﻭ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻙﺩ‬ ‫ﻨ‬ ‫ﺍﻥﻫ‬ ‫ﺒﻖ‬ ‫ﺮﻣﺴ‬ ‫ﺒ‬ ‫ﻪﺧ‬ ‫ﻳ‬ ‫ﺪ‬ ‫ﺮﻟ‬ ‫ﻠ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻣ‬ ‫ﻮ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺒﺢ‬ ‫ﻻﻥﺍﺻ‬ ‫ﻮﻉ ‪void‬ﺍ‬ ‫ﻨ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻴﺚﺍ‬ ‫ﺎﺣ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﺔﻟ‬ ‫ﻤ‬ ‫ﺮﺟ‬ ‫ﺔﺗ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﺍﻥﻳ‬ ‫ﺪ‬ ‫ﺑ‬ ‫ﻪﻻ‬ ‫ﻨ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻌ‬ ‫ﻴ‬ ‫ﺒ‬ ‫ﺓﻃ‬ ‫ﺭ‬ ‫ﻮ‬ ‫ءﺑﺼ‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺎﻓﻲﺍ‬ ‫ﻤ‬ ‫ﻬ‬ ‫ﻌ‬ ‫ﻞﻣ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻪﺳ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﺍﻓ‬ ‫ﺬ‬ ‫ﻴﻦﻟ‬ ‫ﺘ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻪ‪.‬‬ ‫‪Type a number (0 to exit): 1030‬‬ ‫‪Number is even."‪if ((a%2)!=0) cout << "Number is odd.‬‬ ‫‪Type a number (0 to exit): 6‬‬ ‫‪Number is even.‬‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﻩﺍ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﺔﺑ‬ ‫ﺑ‬ ‫ﻮ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﺎﻣ‬ ‫ﻬ‬ ‫ﻠ‬ ‫ﻟﻚﻛ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﻮﻥﺩ‬ ‫ﻜ‬ ‫ﻻﻥﺍﻥﺗ‬ ‫ﻴﻚﻣﻦﺍ‬ ‫ﻠ‬ ‫ﺍﻋ‬ ‫ﺬ‬ ‫ﻟ‬ ‫ﻘﻂﻭ‬ ‫ﺎﻓ‬ ‫ﻴﻄ‬ ‫ﺮﺡﺑﺴ‬ ‫ﻟﺸ‬ ‫ﻮﻥﺍ‬ ‫ﻜ‬ ‫ﻜﻲﻳ‬ ‫ﺎﺏﻟ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻳ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺑ‬ .‬‬ ‫ﺛ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻢﺣ‬ ‫ﺎﺗ‬ ‫ﺍﻣ‬ ‫ﺬ‬ ‫ﻫ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻳ‬ ‫ﺎ‬ ‫ﻬ‬ ‫ﺪﻧ‬ ‫ﻌ‬ ‫ﺎﺑ‬ ‫ﻬ‬ ‫ﺘ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﻡﺑ‬ ‫ﻮ‬ ‫ﻘ‬ ‫ﻨ‬ ‫ﺔﺳ‬ ‫ﻠ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻛ‬ ‫ﺎﺕ‪:‬‬ ‫ﻣﻼﺣﻈ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻴ‬ ‫ﺎﺟ‬ ‫ﻬ‬ ‫ﻪﻟ‬ ‫ﺒ‬ ‫ﺘ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺍ‬ ‫ﺬ‬ ‫ﺔﻟ‬ ‫ﻮﻃ‬ ‫ﻘ‬ ‫ﻨ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺓ‬ ‫ﺯ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﻔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﻮ‬ ‫ﻮﻭﺟ‬ ‫ﻣﺞﻫ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻳ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺔﻓﻲﺑ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻻﻋﻼﻥﻋﻦ‬ ‫ﺰﺍ‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﺬﻱﻳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫*‬ ‫ﺜﻼ‬ ‫ﺮﻣ‬ ‫ﺘ‬ ‫ﻴ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﻢﺍ‬ ‫ﺮﺍﺳ‬ ‫ﻛ‬ ‫ﻟﻰﺫ‬ ‫ﺔﺍ‬ ‫ﺎﺟ‬ ‫ﻟﺤ‬ ‫ﻭﻥﺍ‬ ‫ﻘﻂﺩ‬ ‫ﺎﻓ‬ ‫ﻬ‬ ‫ﻮﻋ‬ ‫ﻧ‬ ‫ﺍﺕﻭ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻣ‬ ‫ﺍ‬ ‫ﺭ‬ ‫ﺎ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺩ‬ ‫ﺪ‬ ‫ﺮﻋ‬ ‫ﻛ‬ ‫ﺬ‬ ‫ﺍﻥﺗ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻻﻋﻼﻥﻋﻦ‬ ‫ﺮﺍ‬ ‫ﻨﻚﻓﻲﺳﻄ‬ ‫ﻜ‬ ‫ﻤ‬ ‫*ﻳ‬ ‫ﻻﻋﻼﻥ ‪:‬‬ ‫ﺍﺍ‬ ‫ﺬ‬ ‫ﻫ‬ ‫.)‪void even (int a‬‬ ‫)( ‪int main‬‬ ‫{‬ ‫.\n‬‬ ‫."‪if ((a%2)==0) cout << "Number is even.) ‪Int add (int .‬‬ ‫ﺬ‬ ‫ﻜ‬ ‫ﻫ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻧ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻠ‬ ‫ﻧﻲﻟ‬ ‫ﺎ‬ ‫ﺜ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻟﻰﻭ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﺔﺍ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻠ‬ ‫ﻝﻟ‬ ‫ﻭ‬ ‫ﻻ‬ ‫ﻳﺢﺍ‬ ‫ﺮ‬ ‫ﺘﺼ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﺚ‬ ‫ﻴﺴﻲﺣ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺎﻟﻦ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺔﻭ‬ ‫ﻔ‬ ‫ﻠ‬ ‫ﺘ‬ ‫ﻤﺨ‬ ‫ﻟ‬ ‫ﻝﺍ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﻦ‬ ‫ﺍﺕﺑ‬ ‫ء‬ ‫ﺎ‬ ‫ﺪﻋ‬ ‫ﺘ‬ ‫ﻻﺳ‬ ‫ﺪﺍ‬ ‫ﻨ‬ ‫ءﻋ‬ ‫ﺎ‬ ‫ﺍﺧﻄ‬ ‫ﻠﻰ‬ ‫ﻞﻋ‬ ‫ﻮﻑﻟﻦﺗﺤﺼ‬ ‫ﻝﺳ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﺔﻣﻦﻛ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﻩﺍ‬ ‫ﺬ‬ ‫*ﻓﻲﻫ‬ ‫ﻟﻚ‬ ‫ﺔﺫ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺎﺷ‬ ‫ﻣ‬ ‫ﻠﻚﻭ‬ ‫ﻞﺗ‬ ‫ﺒ‬ ‫ﺎﻗ‬ ‫ﻬ‬ ‫ﻔ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﺔﻳﺠﺐﺗ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻩ‬ ‫ﺬ‬ ‫ﺍﻥﻫ‬ ‫ﻻﻥ‬ ‫ﺪﺍ‬ ‫ﻌ‬ ‫ﺮﺑ‬ ‫ﻜ‬ ‫ﻔ‬ ‫ﺗ‬ ‫ﺮ‬ ‫ﻨﻈ‬ ‫ﻟ‬ ‫ﺩﺍ‬ ‫ﺮ‬ ‫ﺔﻣﻦﻣﺠ‬ ‫ﻓ‬ ‫ﻭ‬ ‫ﺮ‬ ‫ﻌ‬ ‫ﻣﻚﻣ‬ ‫ﺎ‬ ‫ﻣ‬ ‫ﻝﺍ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻊ‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﻴﺚﺟ‬ ‫ﻮﺡﺣ‬ ‫ﻭﺿ‬ ‫ﺔﻭ‬ ‫ﻗ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺍ‬ ‫ﺔﻭ‬ ‫ﻴ‬ ‫ﻟ‬ ‫ﺎ‬ ‫ﻤ‬ ‫ﺮﺟ‬ ‫ﺜ‬ ‫ﻛ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﻴ‬ ‫ﻣﺞﺳ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻜ‬ ‫ﺍﻥﺷ‬ ‫ﻟﻚ‬ ‫ﻟﻰﺫ‬ ‫ﺍ‬ ‫ﺍﺿﻒ‬ ‫ﻴﻚ‬ ‫ﻠ‬ ‫ﺍﻋ‬ ‫ﺬ‬ ‫‪٬‬ﻟ‬ ‫ﺗﺐ‬ ‫ﺮ‬ ‫ﻣ‬ ‫ﻞﻭ‬ ‫ﻴ‬ ‫ﻤ‬ ‫ﻮﻥﺟ‬ ‫ﻜ‬ ‫ﻴ‬ ‫ﻣﺞﺳ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻞ‬ ‫ﻜ‬ ‫ﻴﺚﺷ‬ ‫ﺮﻯﺣ‬ ‫ﻻﺧ‬ ‫ﺍ‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔﻋﻦ‬ ‫ﻴ‬ ‫ﻴﺴ‬ ‫ﺋ‬ ‫ﺮ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﻮﺡﺍ‬ ‫ﺎﻭﺿ‬ ‫ﻳﻀ‬ ‫ﺍ‬ ‫ﺎﻭ‬ ‫ﻬ‬ ‫ﺗ‬ ‫ﺎ‬ ‫ﻧ‬ ‫ﺍﻋﻼ‬ ‫ﻟﻰ‬ ‫ﺍ‬ ‫ﺔﻓﻲ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﻩﺍ‬ ‫ﺬ‬ ‫ﻞﻫ‬ ‫ﻤ‬ ‫ﻌ‬ ‫ﺘ‬ ‫ﻢﻧﺴ‬ ‫ﻟ‬ ‫ﻴﻦﻭ‬ ‫ﻓ‬ ‫ﺮ‬ ‫ﺘ‬ ‫ﻤﺤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﻴﻦ‬ ‫ﻣﺠ‬ ‫ﺮ‬ ‫ﺒ‬ ‫ﻤ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺔ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﺎﻫﻲﻃ‬ ‫ﻬ‬ ‫ﻧ‬ ‫ﺔﻻ‬ ‫ﻘ‬ ‫ﻳ‬ ‫ﺮ‬ ‫ﻟﻄ‬ ‫ﻩﺍ‬ ‫ﺬ‬ ‫ﻬ‬ ‫ﻣﺠﻚﺑ‬ ‫ﺍ‬ ‫ﺮ‬ ‫ﺔﺑ‬ ‫ﺑ‬ ‫ﺎ‬ ‫ﺘ‬ ‫ﻜ‬ ‫ﺃﺑ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﺍﻥﺗ‬ ‫ﻻﻥ‬ ‫ﻣﻦﺍ‬ ‫ﺔ‪.)‪odd (i‬‬ ‫.)‪else even (a‬‬ ‫}‬ ‫)‪void even (int a‬‬ ‫{‬ ‫.‬‬ ‫‪// declaring functions prototypes‬‬ ‫>‪#include <iostream.‪return 0‬‬ ‫}‬ ‫)‪void odd (int a‬‬ ‫{‬ ‫.‬‬ ‫‪Type a number (0 to exit): 0‬‬ ‫‪Number is even.‪int i‬‬ ‫{ ‪do‬‬ ‫.com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪19‬‬ ‫‪Type a number (0 to exit): 9‬‬ ‫‪Number is odd. int b‬‬ ‫ﻞ‬ ‫ﻜ‬ ‫ﻟﺸ‬ ‫ﺎ‬ ‫ﺘﺐﺑ‬ ‫ﻜ‬ ‫ﺍﻥﻳ‬ ‫ﻜﻦ‬ ‫ﻤ‬ ‫ﻳ‬ ‫.)‪void odd (int a‬‬ ‫.)‪} while (i!=0‬‬ ‫.‫‪Compiler_x@yahoo.)‪Int add (int a.\n‬‬ ‫.

com‬‬ ‫ﻝ‬ ‫ﺍ‬ ‫ﻭ‬ ‫ﺪ‬ ‫ﻟ‬ ‫ﺍ‬ ‫‪20‬‬ ‫ﺍﷲ‬ ‫ﻮﻥ‬ ‫ﻌ‬ ‫ﻢﺑ‬ ‫ﺗ‬ ‫ﻮﺳﻲ‬ ‫ﺮﻃ‬ ‫ﻔ‬ ‫ﻟ‬ ‫ﻝﻣﺤﺴﻦﺍ‬ ‫ﻮ‬ ‫ﺮﺳ‬ ‫ﻟ‬ ‫ﺍ‬ ‫ﺪ‬ ‫ﺒ‬ ‫ﻨﻰﻋ‬ ‫ﺜ‬ ‫ﻣ‬ ‫ﺔ‬ ‫ﻌ‬ ‫ﻣ‬ ‫ﺎ‬ ‫ﻟﺠ‬ ‫ﺍ‬ ‫ﺮﺏ‬ ‫ﻌ‬ ‫ﻟ‬ ‫ﺔﺷﻂﺍ‬ ‫ﻴ‬ ‫ﻠ‬ ‫ﻛ‬ ‫ﺎﺕ‬ ‫ﺒ‬ ‫ﺎﺳ‬ ‫ﻟﺤ‬ ‫ﺍ‬ ‫ﻡ‬ ‫ﻮ‬ ‫ﻠ‬ ‫ﻢﻋ‬ ‫ﻗﺴ‬ ‫‪2006‬‬ ‫‪Compiler_x@ yahoo.‫‪Compiler_x@yahoo.com‬‬ .