‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.

‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
17
And college bagel . email:waelsp3@yahoo.com.

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫ﺟﺎﻣﻌﺔ اﻟﺤﺪﯾﺪة‬
‫ ﺑﺎﺟﻞ‬- ‫ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬
‫ﻗﺴﻢ ﻣﻌﻠﻢ اﻟﺤﺎﺳﻮب‬

 
 


 
 
‫م‬٢٠١٣-٢٠١٢

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
18
And college bagel . email:waelsp3@yahoo.com.

‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات ‪ c++‬ﻋﻤﻠﻲ‬

‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم ‪ -‬ﺑﺎﺟﻞ‬

‫إﻋﺪاد أ‪ .‬واﺋﻞ ﺳﻄﯿﺢ‪٢٠١٣-٢٠١٢‬م‬

‫‪‬‬
‫‪‬‬
‫اﻻﺳﻢ‪ :‬واﺋﻞ ﻗﺎﺳﻢ ﺻﻐﯿﺮ ﺳﻄﯿﺢ‬
‫اﻟﺠﻨﺴﯿﺔ ‪ :‬ﯾﻤﻨﻲ‬
‫اﻟﺠﻨﺲ ‪ :‬ذﻛﺮ‬
‫ﺗﺎرﯾﺦ وﻣﻜﺎن اﻟﻤﯿﻼد ‪ :‬اﻟﯿﻤﻦ – اﻟﺤﺪﯾﺪة – ‪١٩٨٧‬م‬
‫اﻟﺘﻠﻔﻮن ‪733778123 :‬‬
‫‪E-mail: waelsp3@yahoo.com‬‬

‫‪‬‬
‫‪: 2006-2010‬‬
‫ﺑﻜﺎﻟﻮرﯾﻮس ﺗﺮﺑﯿﺔ )ﻗﺴﻢ ﻣﻌﻠﻢ ﺣﺎﺳﻮب( اﻟﯿﻤﻦ – اﻟﺤﺪﯾﺪة – ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ زﺑﯿﺪ – ﺟﺎﻣﻌﺔ اﻟﺤﺪﯾﺪة اﻟﺘﻘﺪﯾﺮ ‪ :‬ﺟﯿﺪ‪//‬‬

‫‪‬‬
‫ﺟﺎﻣﻌﺔ اﻟﺤﺪﯾﺪة – ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ ‪ -‬زﺑﯿﺪ‬

‫‪ – ٢٠١٠‬ﺣﺘﻰ اﻵن‬

‫‪ ‬ﻣﮭﻨﺪس ﺻﯿﺎﻧﺔ وﺗﺸﻐﯿﻞ اﻟﻤﻌﻤﻞ – ﻗﺴﻢ اﻟﺤﺎﺳﻮب‬
‫‪ ‬ﻣﻌﯿﺪ ﻓﻨﻲ ﺑﻘﺴﻢ اﻟﺤﺎﺳﻮب‬
‫‪ ‬ﻣﺸﺮف ﻣﺸﺎرﯾﻊ اﻟﺘﺨﺮج‬
‫‪ ‬ﻣﺸﺮف ﺗﺮﺑﯿﺔ ﻋﻤﻠﯿﺔ ‪ ١‬و ‪٢‬‬
‫‪ ‬ﻣﺪرس اﻟﻌﺪﯾﺪ ﻣﻦ ﻣﻮاد اﻟﺘﺨﺼﺺ ﻛﻠﻐﺎت اﻟﺒﺮﻣﺠﺔ وﻏﯿﺮھﺎ‬
‫ﺟﺎﻣﻌﺔ اﻟﺤﺪﯾﺪة – ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ وﺗﻘﻨﯿﺔ اﻟﻤﻌﻠﻮﻣﺎت‪ -‬رﯾﻤﮫ‬

‫‪٢٠١١ – ٢٠١٠‬‬

‫‪ ‬ﻣﮭﻨﺪس ﺻﯿﺎﻧﺔ وﺗﺸﻐﯿﻞ اﻟﻤﻌﻤﻞ – ﻗﺴﻢ اﻟﺤﺎﺳﻮب‬
‫‪ ‬ﻣﻌﯿﺪ ﻓﻨﻲ ﺑﻘﺴﻢ ﺗﻘﻨﯿﺔ اﻟﻤﻌﻠﻮﻣﺎت‬
‫ﺟﺎﻣﻌﺔ اﻟﺤﺪﯾﺪة – ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم اﻟﺘﻘﻨﯿﺔ واﻟﺘﻄﺒﯿﻘﯿﺔ‪ -‬ﺑﺎﺟﻞ‬

‫‪ – ٢٠١١‬ﺣﺘﻰ اﻵن‬

‫‪ ‬ﻣﮭﻨﺪس ﺻﯿﺎﻧﺔ وﺗﺸﻐﯿﻞ اﻟﻤﻌﻤﻞ – ﻗﺴﻢ اﻟﺤﺎﺳﻮب‬
‫‪ ‬ﻣﻌﯿﺪ ﻓﻨﻲ ﺑﻘﺴﻢ ﺗﻘﻨﯿﺔ اﻟﻤﻌﻠﻮﻣﺎت‬
‫)‪programming in language c++ all student academic(2010-2011m‬‬
‫‪By: T. wael qasem sutaih – hodidah university – college zabid‬‬
‫‪19‬‬
‫‪And college bagel . email:waelsp3@yahoo.com.‬‬

‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات ‪ c++‬ﻋﻤﻠﻲ‬

‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم ‪ -‬ﺑﺎﺟﻞ‬

‫ﺟﺎﻣﻌﺔ اﻟﺤﺪﯾﺪة – ادارة ﻧﻈﻢ اﻟﻤﻌﻠﻮﻣﺎت‬
‫‪ ‬ﻣﺪﯾﺮ ﻗﺎﻋﺪة اﻟﯿﺒﺎﻧﺎت‬
‫‪ ‬ﻣﮭﻨﺪس ﺻﯿﺎﻧﺔ ‪Software – Hardware‬‬
‫ﺟﺎﻣﻌﺔ اﻟﺤﺪﯾﺪة – ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ ‪ -‬اﻟﺤﺪﯾﺪة‬
‫‪ ‬ﻣﻌﯿﺪ ﻓﻨﻲ ﺑﻘﺴﻢ ﻣﻌﻠﻢ اﻟﺤﺎﺳﻮب‬
‫ﺟﺎﻣﻌﺔ اﻟﻌﻠﻮم واﻟﺘﻜﻨﻮﻟﻮﺟﯿﺎ– اﻟﺤﺪﯾﺪة – ﺑﯿﺖ اﻟﻔﻘﯿﮫ‬

‫إﻋﺪاد أ‪ .‬واﺋﻞ ﺳﻄﯿﺢ‪٢٠١٣-٢٠١٢‬م‬

‫‪ -٢٠١٠‬ﺣﺘﻰ اﻻن‬

‫‪ – ٢٠١٢‬ﺣﺘﻰ اﻵن‬
‫‪٢٠١١ -٢٠١٠‬‬

‫‪ ‬ﻣﮭﻨﺪس ﺻﯿﺎﻧﺔ ‪Software – Hardware‬‬
‫‪ ‬ﻣﺪرس ﺑﻘﺴﻢ اﻟﺤﺎﺳﻮب‬

‫‪‬‬
‫‪‬‬
‫‪‬‬

‫‪‬‬
‫‪‬‬
‫‪‬‬

‫ﻣﺮﻛﺰ دوﻧﺎ ﻧﺖ ﻟﻠﻜﻤﺒﯿﻮﺗﺮ اﻟﺤﺪﯾﺪة ‪ -‬ﺑﯿﺖ اﻟﻔﻘﯿﮫ ﻓﻲ ‪٢٠٠١-٦-٢٧‬م‬
‫دورة ﺗﺪرﯾﺒﯿﺔ ﻓﻲ وﯾﻨﺪوز اﻛﺲ ﺑﻲ )‪(windows xp‬‬
‫ﻣﻦ ‪ ٢٠٠٨-١١-٥‬إﻟﻰ ‪٢٠٠٩-١-٢‬‬
‫ﻣﺮﻛﺰ اﻧﻈﻤﺔ وﺗﻘﻨﯿﺔ اﻟﻤﻌﻠﻮﻣﺎت ﺟﺎﻣﻌﺔ اﻟﺤﺪﯾﺪة‬
‫دورة ﺗﺪرﯾﺒﯿﺔ ﻓﻲ اﻟﺮﺧﺼﺔ اﻟﻌﺎﻟﻤﯿﺔ ﻟﻘﯿﺎدة اﻟﺤﺎﺳﻮب)‪(ICDL‬‬
‫*اﻟﻤﺮﻛﺰ اﻟﺼﯿﻔﻲ – ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ زﺑﯿﺪ ﻓﻲ ‪٢٠٠٨‬م‬
‫دورة ﺗﺪرﯾﺒﯿﺔ ﻓﻲ اﻟﻔﻮﺗﻮﺷﻮب واﻟﺘﺼﺎﻣﯿﻢ‪.‬‬
‫دورة ﺗﺪرﯾﺒﯿﺔ ﻓﻲ ﺗﺼﻤﯿﻢ ﻣﻮاﻗﻊ اﻻﻧﺘﺮﻧﺖ‪.‬‬
‫دورة ﺗﺪرﯾﺒﯿﺔ ﻓﻲ اﻧﺘﺎج اﻻﻓﻼم اﻟﻮﺛﺎﺋﻘﯿﺔ‪.‬‬

‫‪: ‬‬
‫‪ ‬اﻟﻠﻐﺔ‬

‫‪ ‬اﻟﺤﺎﺳﺐ‬

‫اﻟﻠﻐﺔ اﻷم ‪ :‬اﻟﻌﺮﺑﯿﺔ‬
‫اﻟﻠﻐﺔ اﻻﻧﺠﻠﯿﺰﯾﺔ ‪ :‬ﺟﯿﺪ‬

‫إﺟﺎدة ﺑﺮاﻣﺞ وﯾﻨﺪوز وﻣﯿﻜﺮوﺳﻮﻓﺖ أوﻓﯿﺲ‬
‫ﺻﯿﺎﻧﺔ اﻟﺤﺎﺳﺐ ) ‪- ( Soft – Hard‬‬
‫اﻟﺒﺮﻣﺠﺔ ﺑﻠﻐﺔ ‪ C++‬وﻟﻐﺔ اﻟﺠﺎﻓﺎ‬

‫ﺗﺮﻛﯿﺐ اﻟﺸﺒﻜﺎت وﺻﯿﺎﻧﺘﮭﺎ‬
‫‪ -‬اﺗﻘﺎن ﺑﻤﺒﺎدئ ﺑﺮاﻣﺞ اﻟﻤﻮﻧﺘﺎج‬

‫اﺗﻘﺎن ﺑﺮاﻣﺞ اﻟﻮﺳﺎﺋﻂ اﻟﻤﺘﻌﺪدة‪.‬‬
‫‪‬‬
‫‪‬‬
‫‪‬‬
‫‪‬‬

‫اﻟﺘﻜﯿﻒ اﻟﺘﺎم ﻟﻠﻌﻤﻞ ﺿﻤﻦ ﻓﺮﯾﻖ اﻟﻌﻤﻞ‪.‬‬
‫اﻟﻘﺪرة ﻋﻠﻰ اﻷداء ﺗﺤﺖ ﺿﻐﻂ اﻟﻌﻤﻞ‪.‬‬
‫اﻟﺘﻤﺘﻊ ﺑﻘﺪرة ﺟﯿﺪة ﻋﻠﻰ ﺑﻨﺎء اﻟﻌﻼﻗﺎت اﻻﺟﺘﻤﺎﻋﯿﺔ اﻟﺒﻨﺎءة ‪.‬‬
‫اﻟﻘﺪرة ﻋﻠﻰ ﻗﯿﺎدة ﻓﺮﯾﻖ ﻋﻤﻞ واﻹﺷﺮاف ﻋﻠﯿﮫ‪.‬‬

‫)‪programming in language c++ all student academic(2010-2011m‬‬
‫‪By: T. wael qasem sutaih – hodidah university – college zabid‬‬
‫‪20‬‬
‫‪And college bagel . email:waelsp3@yahoo.com.‬‬

‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات ‪ c++‬ﻋﻤﻠﻲ‬

‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم ‪ -‬ﺑﺎﺟﻞ‬

‫إﻋﺪاد أ‪ .‬واﺋﻞ ﺳﻄﯿﺢ‪٢٠١٣-٢٠١٢‬م‬

‫ﺍﺑﺘﺴﺎﻣﺔ‬
‫ﺍﺣﻠﻢ ﺑﺸﻤﺲ ﻣﻀﻴﺌﻪ ﰲ ﻏﺪ ﲨﻴﻞ‪...‬ﺍﲝﺚ ﻋﻦ ﺍﻟﺼﻔﺎﺀ ﻭﻟﻮ ﻟﻠﺤﻈﻬﻮﺃﲝﺚ ﻋﻦ ﺍﻟﻮﻓﺎﺀ ﻭﻟﻮ ﻛﺎﻥ‬
‫‪...‬ﻣﺘﻌﺒﺎ ﻭﺷﺎﻗﺎ‬
‫‪...‬ﻭﺃﲝﺚ ﻋﻦ ﺧﻴﻮﻁ ﺍﻟﺸﻤﺲ ﺣﺘﻰ ﻭﻟﻮ ﻛﺎﻧﺖ ﺑﻌﻴﺪﻩ‬
‫‪...‬ﻭﻻﺗﱰﻙ ﻗﻠﺒﻚ ﻭﻣﺸﺎﻋﺮﻙ ﻷﺷﻴﺎﺀ ﺿﺎﻉ ﺯﻣﺎﳖﺎ‬
‫‪...‬ﻓﺈﺫﺍ ﱂ ﲡﺪ ﻣﻦ ﻳﺴﻌﺪﻙ ﻓﺤﺎﻭﻝ ﺍﻥ ﺗﺴﻌﺪ ﻧﻔﺴﻚ‬
‫‪...‬ﻭﺇﺫﺍ ﱂ ﲡﺪ ﻣﻦ ﻳﻐﺮﺱ ﰲ ﺃﻳﺎﻣﻚ ﻭﺭﺩﻩ‪،‬ﻓﻼﺗﺴﻌﻰ ﳌﻦ ﺯﺭﻉ ﰲ ﻗﻠﺒﻚ ﺳﻬﻤﺎ" ﻭﻣﻀﻰ‬
‫ﺃﺣﻴﺎﻧﺎ ﻳﻐﺮﻗﻨﺎ ﺍﳊﺰﻥ ﺣﺘﻰ ﻧﻌﺘﺎﺩ ﻋﻠﻴﻪ‪،‬ﻭﻧﻨﺴﻰ ﺃﻥ ﰲ ﺍﳊﻴﺎﺓ ﺃﺷﻴﺎﺀ ﻛﺜﲑﻩ ﳝﻜﻦ ﺃﻥ ﺗﺴﻌﺪﻧﺎ‬
‫ﺃﲤﻨﻰ ﻟﻜﻢ ﺍﻟﺴﻌﺎﺩﺓ ﻃﻮﺍﻝ ﺣﻴﺎﺗﻜﻢ‬

‫)‪programming in language c++ all student academic(2010-2011m‬‬
‫‪By: T. wael qasem sutaih – hodidah university – college zabid‬‬
‫‪21‬‬
‫‪And college bagel . email:waelsp3@yahoo.com.‬‬

‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات ‪ c++‬ﻋﻤﻠﻲ‬

‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم ‪ -‬ﺑﺎﺟﻞ‬

‫إﻋﺪاد أ‪ .‬واﺋﻞ ﺳﻄﯿﺢ‪٢٠١٣-٢٠١٢‬م‬

‫ﺍﻻﻫﺪﺍﺀ‬
‫ﺣﺒﻴﺒﺘﻲ ‪ ...‬ﺃﻧﱵ ﻳﺎﻣﻦ ﺭﻓﻌﺖ‪ ‬ﺭﺃﺳﻲ ﺷﺎﳐﺎً‬
‫ﻭﺃﻧﺮﺕ‪ ‬ﺩﺭﺑﻲ ﺳﺎﻃﻌﺎً‪...‬‬
‫ﻭﺃﺳﻌﺪﺗﻲ ﺣﻴﺎﺗﻲ ﺑﻮﻗﻮﻓﻚ‪ ‬ﺍﱃ ﺟﺎﻧﱯ ﺩﺍﺋﻤﺎً‪!...‬‬
‫ﺃﻧﺖ‪ ‬ﺑﻨﻈﺮ ﺍﻟﻨﺎﺱ ﺃﻧﱵ‪ ...‬ﻭﺑﻨﻈﺮﻱ ﺃﺭﻭﻉ ﻭﺃﲨﻞ ﺍﺣﺴﺎﺱ‬
‫ﺃﻧﱵ ﻟﻮ ﺃﻗﺪﺭ ﻷﻫﺪﻳﺘﻚ‪ ‬ﻋﻤﺮﻱ ﻭﻟﺘﻨﺎﺯﻟﺖ ﻟﻚ‪ ‬ﲝﻴﺎﺗﻲ‬
‫ﻓﻤﺎﺫﺍ ﺃﻫﺪﻳﻚ‪!...‬‬
‫ﺇﻥ ﺃﻫﺪﻳﺘﻚ‪ ‬ﺫﻫﺒﺎً ﻓﺄﻧﺖ‪ ‬ﺣﻘﺎً ﺃﻏﻠﻰ‬
‫ﻓﻤﺎﺫﺍ ﺃﻫﺪﻳﻚ‪!...‬‬
‫ﺇﻥ ﺃﻫﺪﻳﺘﻚ‪ ‬ﻭﺭﺩﺍً ﻓﺄﻧﺖ‪ ‬ﻭﺍ‪ ‬ﺃﺣﻠﻰ‬
‫ﻓﻤﺎﺫﺍ ﺃﻫﺪﻳﻚ‪!...‬‬
‫ﺇﻥ ﺃﻫﺪﻳﺘﻚ‪ ‬ﺣﻴﺎﺗﻲ ﻳﺎﺭﻳﺘﻬﺎ ﺗﺴﻮﻯ‬
‫ﺇﻥ ﺗﻨﺎﺯﻟﺖ ﻟﻚ‪ ‬ﻓﺄﻧﺖ‪ ‬ﺃﻋﻠﻰ‬
‫ﻳﺎﺃﻏﻠﻰ ﻣﺎﰲ ﺍﻟﻜﻮﻥ‬
‫ﻭﺃﲨﻞ ﻣﺎﰲ ﺍﻟﻮﺟﻮﺩ‬
‫ﻓﺬﻛﺮﻙ‪ ‬ﳝﺤﻮﺍ ﳘﻮﻣﻲ ﻭﻛﻼﻣﻚ‪ ‬ﺑﻠﺴﻢ ﻳﺪﺍﻭﻱ ﺟﺮﻭﺣﻲ‬
‫ﺇﺫﺍ‪ ‬ﺃﻧﱵ ﺃﻧﱵ ﺣﺒﻴﺒﱵ ﻧﻌﻢ ﺍﻟﻴﻚ‪‬‬

‫ﻳﺎأﻣﻲ‬

‫)‪programming in language c++ all student academic(2010-2011m‬‬
‫‪By: T. wael qasem sutaih – hodidah university – college zabid‬‬
‫‪22‬‬
‫‪And college bagel . email:waelsp3@yahoo.com.‬‬

‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات ‪ c++‬ﻋﻤﻠﻲ‬

‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم ‪ -‬ﺑﺎﺟﻞ‬

‫إﻋﺪاد أ‪ .‬واﺋﻞ ﺳﻄﯿﺢ‪٢٠١٣-٢٠١٢‬م‬

‫ﺷـﻜﺮ ﻭﻋﺮﻓﺎﻥ‬
‫ﲝﺮﻭﻑ‪ ‬ﻣﻦ ﻧﻮﺭ ﻭﻛﻠﻤﺎﺕ‪ ‬ﻣﻦ ﺿﻴﺎﺀ‪...‬‬
‫ﺇﱃ ﻣﻦ ﻣﺪ‪ ‬ﻳﺪ‪ ‬ﺍﻟﻌﻮﻥ ﱄ‪...‬‬
‫ﺇﱃ ﻣﻦ ﺳﺎﻧﺪﻧﻲ ﻃﻮﺍﻝ ﻣﺴﲑﺗﻲ ﺍﻷﻛﺎﺩﳝﻴﺔ‬
‫ﺍﱃ ﻣﻦ ﺟﻌﻠﲏ ﺃﺻﻨﻊ ﻣﻦ ﺍﻟﺼﻌﻮﺑﺔ ﺍﺑﺪﺍﻋﺎ ﻭﻣﻦ ﺍﻟﻘﺴﻮﺓ ﺍﳒﺎﺯﺍً‬
‫ﻻﻳﺴﻌﲏ ﻫﻨﺎ ﺍﻻ ﺃﻥ ﺃﺭﺩ ﻟﻚ ﺍﳉﻤﻴﻞ ﲠﺬﺍ ﺍﳌﺨﻄﻮﻁ ﺍﻟﺬﻱ ﺑﺎﺕ ﻣﻜﺒﻮﺗﺎً‬
‫ﻃﻮﺍﻝ ﺍﳊﻴﺎﺓ‪...‬‬
‫ﻫﻨﺎ‪ ...‬ﻻ ﺃﻣﻠﻚ ﺳﻮﻯ ﺩﻋﻮﺓ‪ ‬ﺻﺎﳊﺔ ﰲ ﻇﻬﺮ ﺍﻟﻐﻴﺐ‬
‫ﺍﱃ ﺍﺳﺘﺎﺫﻱ ﻭﻣﻌﻠﻤﻲ ﺍﻟﻘﺪﻳﺮ ‪:‬أ‪ .‬ﻣﺤﻤﻮد ﻫﺪﻳﺶ‬

‫ﺍﺩﻋﻮﺍ ﻟﻪ ﺑﺎﻟﺘﻮﻓﻴﻖ‬

‫ﻭﻛﺬﻟﻚ ﺍﱃ ﺍﺧﻮﺍﻧﻲ ﺍﻟﺬﻳﻦ ﱂ ﺗﻠﺪﻫﻢ ﺃﻣﻲ‬
‫ﺍﻟﺬﻳﻦ ﻣﺪﻭﺍ ﱄ ﻳﺪ ﺍﻟﻌﻮﻥ ﻭﺳﺎﻧﺪﻭﻧﻲ ﻃﻮﺍﻝ ﻣﺴﲑﺗﻲ ﺍﻻﻛﺎﺩﳝﻴﺔ‬
‫ﺍﱃ ﺍﺧﻮﺍﻧﻲ‪ :‬ﺃ‪ .‬ﳏﻤﻮﺩ ﻫﻴﺶ ﻭﺃ‪.‬ﳒﻴﺐ ﺟﱪﻳﻞ ﻭﺃ‪.‬ﻋﻠﻲ ﺧﻠﻴﻞ‬
‫‪,‬ﺍﱃ ﺃﺧﱵ ﺍﻻﺳﺘﺎﺫﺓ ﻧﻮﺭﺓ ﺍﻟﻮﻟﻴﺪﻱ ﻭﺃﺧﱵ ﺍﻟﻐﺎﻟﻴﺔ ﺃﲰﺎﺀ ‪ ...‬ﺍﻟﱵ ﺩﺍﺋﻤﺎً ﻛﺎﻧﺖ ﲜﺎﻧﱯ‪..‬‬
‫)‪programming in language c++ all student academic(2010-2011m‬‬
‫‪By: T. wael qasem sutaih – hodidah university – college zabid‬‬
‫‪23‬‬
‫‪And college bagel . email:waelsp3@yahoo.com.‬‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫ﺑﺴﻢ ﺍﷲ ﺍﻟﺮﲪﻦ ﺍﻟﺮﺣﻴﻢ‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
24
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

:‫ﺑﺮﻧﺎﻣﺞ ﯾﻘﻮم ﺑﺠﻤﻊ ﻋﺪدﯾﻦ ﻣﺪﺧﻠﯿﻦ ﻣﻦ ﻗﺒﻞ اﻟﻤﺴﺘﺨﺪم وﯾﻘﻮم ﺑﻄﺒﺎﻋﺔ اﻟﻨﺘﯿﺠﺔ‬
#include<iostream.h>
main()
{int x,y,z;
cout<<"please enter number one ";
cin>>x;
cout<<"please enter number tow ";
cin>>y;
z=x+y;
cout<<"the sum number : z= "<<z;
for(;;);
}

:‫ﺑﺮﻧﺎﻣﺞ ﯾﻘﻮم ﺑﺠﻤﻊ ﻋﺪدﯾﻦ ﺑﺪون ادﺧﺎل ﻣﻦ اﻟﻤﺴﺘﺨﺪم وﯾﻘﻮم ﺑﻄﺒﺎﻋﺔ اﻟﻨﺘﯿﺠﺔ‬
#include<iostream.h>
main()
{int x,y,z;
X=5;
Y=6;
z=x+y;
cout<<"the sum number : z= "<<z;
for(;;);
}

#include<iostream.h>
main()
{
int n,f;
cout<<" pls enter number ";
cin>>n;
f=1;
for(int i=1;i<=n;i++)
f=f*i ;
cout<<"factorial "<<n<<" : = ";
cout<<f;
for(;;);
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
25
And college bagel . email:waelsp3@yahoo.com.

:‫ﺑﺮﻧﺎﻣﺞ ﻻﯾﺠﺎد ﻣﻀﺮوب ﻋﺪد ﻣﻌﯿﻦ ﯾﺪﺧﻠﮫ اﻟﻤﺴﺘﺨﺪم‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

#include<iostream.h>
main()
{
int x=0;
cout<<"plze choose num1-7 ";

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

١‫ ﻟﻄﺒﺎﻋﺔ اﯾﺎم اﻻﺳﺒﻮع ﺑﺤﯿﺚ ﻧﺪﺧﻞ اﻟﺮﻗﻢ‬case ‫اﺳﺘﺨﺪام ﺟﻤﻠﺔ‬
.....‫ وھﻜﺬا‬sun ‫ ﯾﻌﻄﻲ‬٢ ‫ وادﺧﺎل‬sat ‫ﯾﻌﻄﯿﻨﺎ‬

cin>>x;
switch(x)
{
case 1:
cout<<"sat"<<endl;
break;
case 2:
cout<<"sun"<<endl;
break;
case 3:
cout<<"mon"<<endl;
break;
case 4:
cout<<"with"<<endl;
break;
case 5:
cout<<"thu"<<endl;
break;
case 6:
cout<<"tran"<<endl;
break;
case 7:
cout<<"fri"<<endl;
}
for(;;);
}

#include <iostream.h>
main ()
{ int a;
cout<<"pleas enter number : ";
cin>>a;
cout<<a*1<<endl;
cout<<a*2<<endl;
cout<<a*3<<endl;
cout<<a*4<<endl;
cout<<a*5<<endl;
cout<<a*6<<endl;
cout<<a*7<<endl;
cout<<a*8<<endl;
cout<<a*9<<endl;
cout<<a*10<<endl;
for(;;);
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
26
And college bagel . email:waelsp3@yahoo.com.

١٠ ‫ اﻟﻰ‬١ ‫ ﻓﻲ اﻻﻋﺪاد ﻣﻦ‬a ‫ﺑﺮﻧﺎﻣﺞ ﻟﻀﺮب اﻟﻌﺪد‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

#include <iostream.h>
main ()
{ int a;
cout<<"pleas enter number : ";
cin>>a;
for(int i =1;i<=10;i++)
cout<<a*i<<endl;
for(;;);
}

for ‫ﺑﺎﺳﺘﺨﺪام‬١٠ ‫ اﻟﻰ‬١ ‫ ﻓﻲ اﻻﻋﺪاد ﻣﻦ‬X ‫ﺑﺮﻧﺎﻣﺞ ﻟﻀﺮب اﻟﻌﺪد‬

:‫ﻻﺣﻆ اﻟﻔﺮق ﺑﯿﻦ اﻟﻤﺜﺎﻟﯿﻦ اﻟﺴﺎﺑﻘﯿﻦ واﯾﮭﻤﺎ اﺳﮭﻞ وأﻋﻢ ؟ ﺛﻢ اﻛﺘﺐ ﻣﺎﯾﻤﺜﻠﮫ ﺧﺮج اﻟﺒﺮﻧﺎﻣﺞ اﻟﺘﺎﻟﻲ‬
#include<iostream.h>
main()
{int x,y,z;
cout<<"please enter number one ";
cin>>x;
cout<<"please enter number tow ";
cin>>y;
if (x>y)
cout<<"x as bigest";
else
if (x<y)
cout<<"y as bigest";
else
cout<<"ecuals";
for(;;);
}
n

x,n ‫ ﻟﻌﺪدﯾﻦ‬x ‫ﺑﺮﻧﺎﻣﺞ ﻻﯾﺠﺎد اﻟﻘﻮة اﻻﺳﯿﺔ‬
#include<iostream.h>
main()
{
int n,y,x;
cout<<" pls enter number base\t";
cin>>n;
y=1;
cout<<" pls enter number power\t";
cin>>x;
for(int i=1;i<=n;i++)
y=y*x ;
cout<<"power(x,n)=> X^N = \t"<<y;
for(;;);
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
27
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

whil ‫ﺣﻠﻘﺎت اﻟﺘﻜﺮار‬
‫ﺗﺴﺘﺨﺪم ﻟﺘﻜﺮار ﺗﻌﻠﯿﻤﺔ او ﻣﺠﻤﻮﻋﺔ ﻣﻦ اﻟﺘﻌﻠﯿﻤﺎت ﻋﺪد ﻣﻦ اﻟﻤﺮات ﻋﻨﺪﻣﺎﯾﻜﻮن ﻋﺪد ﻣﺮات اﻟﺘﻜﺮار ﻣﻌﺮوﻓﺎ او ﻏﯿﺮ ﻣﻌﺮوف وﯾﺮاﻓﻖ‬
‫ أﻣﺜﻠﺔ‬: ‫ھﺬه اﻟﺤﻠﻘﺔ ﺷﺮط اﻟﺘﻜﺮار‬
#include<iostream.h>
main()
{
int n,f=1;
cout<<" pls enter number \t";
cin>>n;
while(n>0)
{
f=f*(n--);
}
cout<<"factorial number : f="<<f;
for(;;);
}

whil ‫ﺑﺮﻧﺎﻣﺞ ﻟﺤﺴﺎب اﻟﻤﻀﺮوب ﺑﺎﺳﺘﺨﺪام اﻟﺤﻠﻘﺔ‬

(n--) ‫*ﻟﻤﺎذا ﻻﺗﺘﺴﺎﺋﻞ اﺳﺘﺨﺪام اﻟﻌﻤﻠﯿﺔ‬

:‫ﺑﺮﻧﺎﻣﺞ ﻟﺤﺴﺎب ﻃﻮل ﻋﺪد ﺻﺤﯿﺢ‬
#include<iostream.h>
main()
{
int n,f=0;
cout<<" pls enter number \t";
cin>>n;
while(n!=0)
{
n/=10;
f++;}
cout<<"toll number : f= "<<f;
for(;;);
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
28
And college bagel . email:waelsp3@yahoo.com.

‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات ‪ c++‬ﻋﻤﻠﻲ‬

‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم ‪ -‬ﺑﺎﺟﻞ‬

‫إﻋﺪاد أ‪ .‬واﺋﻞ ﺳﻄﯿﺢ‪٢٠١٣-٢٠١٢‬م‬

‫ﺣﻠﻘﺔ اﻟﺘﻜﺮار ‪do..while‬‬
‫ﺗﺴﺘﺨﺪم ﻟﺘﻨﻔﯿﺬ ﺗﻌﻠﯿﻤﺔ او ﻣﺠﻤﻮﻋﺔ ﻣﻦ اﻟﺘﻌﻠﯿﻤﺎت ﻋﺪد ﻣﻦ اﻟﻤﺮات ﺣﯿﺚ ﻋﺪد اﻟﻤﺮات ﻏﯿﺮ ﻣﻌﻠﻮم وﺗﺘﻮﻗﻒ ﻋﻤﻠﯿﺔ اﻟﺘﻜﺮار ﻋﻠﻰ ﺷﺮط‬
‫ﻣﻮﺟﻮدﻓﻲ ھﺬه اﻟﺤﻠﻘﺔ وﯾﺘﻢ اﻟﺘﺤﻘﻖ ﻣﻦ ﺷﺮط اﻟﺪﺧﻮل ﻟﻠﺤﻠﻘﺔ ﺑﻌﺪ ﺗﻨﻔﯿﺬ ﺗﻌﻠﯿﻤﺎت اﻟﺤﻠﻘﺔ ﻣﺎﯾﻌﻨﻲ ﺗﻨﻔﯿﺬ ﺗﻌﻠﯿﻤﺎت اﻟﺤﻠﻘﺔ ﻣﺮة واﺣﺪة ﻋﻠﻰ‬
‫اﻻﻗﻞ وﻟﻮ ﻛﺎن اﻟﺸﺮط ﻏﯿﺮ ﻣﺘﺤﻘﻖ‪ .‬ﺑﻌﻜﺲ ﺣﻠﻘﺔ اﻟﺘﻜﺮار‪ while‬ﻻﺗﺴﻤﺢ ﺑﺎﻟﺪﺧﻮل ﻟﮭﻞ ﻣﺎﻟﻢ ﯾﺘﺤﻘﻖ ﺷﺮط اﻟﺪﺧﻮل‪.‬‬
‫ﻣﺜﺎل ‪:‬‬

‫اﻛﺘﺐ ﺧﺮج اﻟﺒﺮﻧﺎﻣﺞ اﻟﺘﺎﻟﻲ ‪:‬وﻣﺎ آﻟﯿﺔ ﻋﻤﻠﮫ‪...........................................................................‬‬
‫>‪#include<iostream.h‬‬
‫)(‪main‬‬
‫{‬
‫;‪int a=15,b=5,c‬‬
‫‪do‬‬
‫{‬
‫;‪c= a % b‬‬
‫;‪a= b‬‬
‫;‪b= c‬‬
‫}‬
‫;)‪while (c > 0‬‬
‫;‪cout<<a‬‬
‫;);;(‪for‬‬
‫}‬

‫ﺑﺮﻧﺎﻣﺞ ﻻﯾﺠﺎد اﻟﻤﻀﺎﻋﻒ اﻟﻤﺸﺘﺮك اﻻﺻﻐﺮ ﺑﯿﻦ ﻋﺪدﯾﻦ؟‬

‫)‪programming in language c++ all student academic(2010-2011m‬‬
‫‪By: T. wael qasem sutaih – hodidah university – college zabid‬‬
‫‪29‬‬
‫‪And college bagel . email:waelsp3@yahoo.com.‬‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

: for ‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻟﺸﻜﻞ اﻟﺘﺎﻟﻲ ﺑﺎﺳﺘﺨﺪام‬

#include<iostream.h>
main()
{
int n=10,i,j;
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
cout<<"*";
cout<<endl;
}
}

:for ‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻟﺸﻜﻞ اﻟﺘﺎﻟﻲ ﺑﺎﺳﺘﺨﺪام‬

#include<iostream.h>
main()
{
int n=10,i,j;
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
cout<<"*";
cout<<endl;}
for(i=10;i>0;i--)
{
for(j=0;j<i;j++)
cout<<"*";
cout<<endl;
}
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
30
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

(‫اﻛﺘﺐ ﺧﺮج اﻟﺒﺮﻧﺎﻣﺞ اﻟﺘﺎﻟﻲ )واﺟﺐ‬

#include<iostream.h>
main()
{
int n=20,i,j,m=n/2;
for(I = 0 ; I < n ; i++)
{
if (i < m )
for(j = 0 ; j < I ; j++)
cout<<"*";
else
{
for(j=m;j>0;j--)
cout<<"*";
m--;
}
cout<<endl;
}
}

‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻟﺸﻜﻞ اﻟﺘﺎﻟﻲ‬
#include<iostream.h>
main()
{
int n=10,i,j;
for( I = 0; i<n ;i++)
{
for( j=i; j < n; j++)
cout<<"*";
cout<<endl;
}
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
31
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

#include<iostream.h>
main()
{
int n=10,i,j;
for(i=0;i<10;i++)
{
for(j=0;j<10;j++)
cout<<"*";
cout<<endl;}}

‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻟﺸﻜﻞ اﻟﺘﺎﻟﻲ‬

#include<iostream.h>
main()
{
int n=10,i,j;
for(i=1;i<10;i++)
{

:‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻟﺸﻜﻞ اﻟﺘﺎﻟﻲ‬

for(j=1;j<i;j++)
cout<<"*";
cout<<endl;}
for(i=1;i<10;i++)
{
for(j=1;j<10;j++)
cout<<"*";
cout<<endl;
}
}
#include<iostream.h>
main()
{
int n=10,i,j;
for(i=1;i<10;i++)
{
for(j=1;j<i;j++)
cout<<"*";
cout<<endl;}
for(i=1;i<10;i++)
{
for(j=1;j<10;j++)
cout<<"*";
cout<<endl;
}
for(i=1;i<10;i++)
{
for(j=i;j<10;j++)
cout<<"*";
cout<<endl;}
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
32
And college bagel . email:waelsp3@yahoo.com.

:‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻟﺸﻜﻞ اﻟﺘﺎﻟﻲ‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫ ﺑﺪون ﺑﺎﻗﻲ؟‬٦‫و‬٤‫و‬٢ ‫ ﻣﺎﻋﺪا اﻻﻋﺪاد اﻟﺘﻲ ﺗﻘﺒﻞ اﻟﻘﺴﻤﺔ ﻋﻠﻰ اﻻﻋﺪاد‬١٠٠ ‫ اﻟﻰ‬١ ‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻻﻋﺪاد ﻣﻦ‬
#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int n=10,i,j;
for(i=1;i<=100;i++)
if((i%2!=0)||(i%4!=0)||(i%6!=
0))
cout<<i<<endl;
getch();
}

for ‫ ﺑﺎﺳﺘﺨﺪام‬١٠-١ ‫ﺑﺮﻧﺎﻣﺞ ﻻﯾﺠﺎد ﻣﻀﺮوب اﻻﻋﺪاد ﻣﻦ‬

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{
clrscr();
int s,n=10,i,j;
for(i=1;i<=5;i++)
{
s=1;
for(j=2;j<=i;j++)
s=s*j;
cout<<'!'<<setw(2)<<i<<setw(8)<<s<<endl;
}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
33
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

switch ‫ و‬do while ‫ ﺑﺎﺳﺘﺨﺪام‬٥ – ١ ‫ ﻣﻦ اﻻﻋﺪاد وﯾﺘﺎﻛﺪ ﻣﻦ اﻻﻋﺪاد اﻟﻮاﻗﻌﺔ ﺑﯿﻦ‬n ‫ﺑﺮﻧﺎﻣﺞ ﯾﺴﻤﺢ ﺑﺎدﺧﺎل‬
one ‫ ﯾﻄﺒﻊ‬x=1 ‫ﻓﻲ ﺣﺎﻟﺔ‬
tow ‫ ﯾﻄﺒﻊ‬x=2 ‫ﻓﻲ ﺣﺎﻟﺔ‬
three
‫ ﯾﻄﺒﻊ‬x=3 ‫ﻓﻲ ﺣﺎﻟﺔ‬
#include<iostream.h>
#include<conio.h>
four ‫ﯾﻄﺒﻊ‬x=4 ‫ﻓﻲ ﺣﺎﻟﺔ‬
#include<iomanip.h>
main()
{
clrscr();
int x=0;
cout<<"note:- "<<endl<<endl<<"for EXITE
enter value 100"<<endl;
do
{
cin>>x;
if(x>=1 && x<=5 && x!=100)
{ switch(x)
{
case 1: cout<<"one"<<endl;break;
case 2: cout<<"tow"<<endl;break;
case 3: cout<<"three"<<endl;break;
case 4: cout<<"four"<<endl;break;
case 5: cout<<"five"<<endl;break;
}
}
}
while(x!=100);
}

٢٠- ١٠ ‫ﺑﺮﻧﺎﻣﺞ ﯾﺴﻤﺢ ﺑﺎدﺧﺎل اﻻﻋﺪاد اﻟﻮاﻗﻌﺔ ﺑﯿﻦ‬
#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int x;
cout<<"enter number:-";
cin>>x;
if(x>10 && x<=20)
cout<<"the value "<<x
<<"is between 10 -20 "<<endl;
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
34
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

while ‫ﺑﺮﻧﺎﻣﺞ ﯾﺤﺴﺐ ﻣﻀﺮوب ﻋﺪد ﺑﺎﺳﺘﺨﺪام‬
#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int n,s=1;
cout<<"enter number:-";
cin>>n;
while(n!=1)
{
s=s*n;
--n;
}
cout<<" fact number :" <<s;
getch();
}

‫واﺟﺐ ؟‬

do while ‫ﺑﺮﻧﺎﻣﺞ ﯾﺤﺴﺐ ﻣﻀﺮوب ﻋﺪد ﺑﺎﺳﺘﺨﺪام‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
35
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int i,j,n;
cout<<"pls enrer number n:";
cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
if(i+j<n+1)
cout<<"#" ;
else
cout<<"*";
cout<<endl;
}
getch();
}

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

: ‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻟﺸﻜﻞ اﻟﺘﺎﻟﻲ‬

: ‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻟﺸﻜﻞ اﻟﺘﺎﻟﻲ‬

‫اﻛﺘﺐ ﺧﺮج اﻟﺒﺮﻧﺎﻣﺞ اﻟﺘﺎﻟﻲ‬
#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int i,j,n;
cout<<"pls enrer number n:";
cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
if(i+j<n+1)
cout<<"" ;
else
cout<<"*";
cout<<endl;
}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
36
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫ ﺑﺎﻻﻋﺘﻤﺎد ﻋﻠﻰ ادﺧﺎل ﻃﻮل اﻟﻤﺘﺴﻠﺴﻠﺔ‬: ‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ ﻣﺘﺴﻠﺴﻠﺔ ﻓﺎﺑﯿﻮﻧﺴﻲ‬
#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int i,n,a=0,b=1,c;
cout<<" pls enter toaller sequnce : ";
cin>>n;
cout<<b;
for(i=0;i<n;i++)
{
c=b;
b=b+a;
a=c;
cout<<' '<<b;
}
getch();
}

‫ ؟‬X=1+1/2+1/3+1/4+…………….+1/N : ‫ﺑﺮﻧﺎﻣﺞ ﻟﺤﺴﺎب اﻟﻤﺘﺴﻠﺴﻠﺔ اﻟﺘﺎﻟﯿﺔ‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
37
And college bagel . email:waelsp3@yahoo.com.

‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات ‪ c++‬ﻋﻤﻠﻲ‬

‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم ‪ -‬ﺑﺎﺟﻞ‬

‫إﻋﺪاد أ‪ .‬واﺋﻞ ﺳﻄﯿﺢ‪٢٠١٣-٢٠١٢‬م‬

‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻟﻤﺘﺴﻠﺴﻠﺔ اﻟﺘﺎﻟﯿﺔ ‪:‬‬

‫>‪#include<iostream.h‬‬
‫>‪#include<conio.h‬‬
‫)(‪main‬‬
‫{‬
‫;)(‪clrscr‬‬
‫;‪int i,n‬‬
‫;‪float s=0‬‬
‫;" ‪cout<<" pls enter toaller sequnce :‬‬
‫;‪cin>>n‬‬
‫)‪for(i=1;i<=n;i++‬‬
‫{‬
‫;)‪s=s+(1/i‬‬
‫};" "<<‪cout<<i<<" "<<s‬‬
‫;)(‪getch‬‬
‫}‬
‫ﺗﻤﺎرﯾﻦ ‪:‬‬
‫‪ -١‬ﺑﺮﻧﺎﻣﺞ ﯾﻄﻠﺐ ادﺧﺎل ﻋﺪد ﻣﻦ اﻟﻤﺴﺘﺨﺪم وﯾﻘﻮم ﺑﻄﺒﺎﻋﺔ ﺧﺎﻧﺎت اﻟﻌﺪد ﻣﺜﻼً اﻟﻌﺪد ‪ ١٢٣٤‬ﻓﯿﻌﻄﻲ اﻟﻨﺘﯿﺠﺔ‪:‬‬
‫‪٤‬‬
‫‪٣‬‬
‫‪٢‬‬
‫‪١‬‬

‫‪-٢‬‬
‫‪-٣‬‬
‫‪-٤‬‬
‫‪-٥‬‬
‫‪-٦‬‬

‫ارﺑﻌﺔ‬
‫ﺛﻼﺛﯿﻦ‬
‫ﻣﺎﻧﺘﺎن‬
‫اﻟﻒ‬

‫ﯾﺪﺧﻞ أي رﻣﺰ ﻣﻨﻠﻮﺣﺔ اﻟﻤﻔﺎﺗﯿﺢ وﯾﻄﺒﻊ ﻧﻮع اﻟﺮﻣﺰ اﻟﻤﺪﺧﻞ ھﻞ ھﻮ رﻗﻢ أم ﺣﺮف؟‬
‫اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﺑﻠﻐﺔ ‪ c++‬ﯾﻘﻮم ﺑﺘﻌﺮﯾﻒ ﻣﺘﻐﯿﺮ ﻣﻦ ﻧﻮع ﺳﻠﺴﻠﺔ وﯾﻄﺒﻌﮭﺎ؟‬
‫ﺑﺮﻧﺎﻣﺞ ﻟﺘﺤﻮﯾﻞ اﻟﻌﺪد اﻟﻌﺸﺮي اﻟﻰ اﻟﻨﻈﺎم اﻟﺜﻨﺎﺋﻲ؟‬
‫ﻣﺎﻟﻔﺮق ﺑﯿﻦ اﻟﻌﻼﻣﺎت )&&و||(ﻣﺰدوﺟﺔ و )&و|( ﻣﻔﺮدة ؟‬
‫اﻛﺘﺸﻒ اﻟﺨﻄﺄ ان وﺟﺪ ﻓﻲ اﻟﺒﺮﻧﺎﻣﺞ اﻟﺘﺎﻟﻲ ﺛﻢ اﻛﺘﺐ ﺧﺮج اﻟﺒﺮﻧﺎﻣﺞ ‪:‬‬
‫>‪#include<iostream.h‬‬
‫)(‪Main‬‬
‫{‬
‫;‪Int y=4‬‬
‫;‪Int z=22000‬‬
‫;‪Int x=y*z‬‬
‫;‪Cout<<x‬‬
‫}‬

‫‪ -٧‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﯾﺤﺴﺐ اﻟﻘﺎﻧﻮن اﻟﻌﺎم ؟‬
‫‪ -٨‬ﻣﺎﻟﻔﺮق ) (‪ setw‬و ‪ endl‬و ‪ \n‬و ‪ \d‬و )(‪ getch‬و )(‪ clrscr‬و ‪. contenue break‬‬
‫‪ -٩‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﯾﻘﻠﺐ اﻟﻌﺪد ‪ ١٢٣‬اﻟﻰ اﻟﻌﺪد ‪ ٣٢١‬؟‬
‫‪ -١٠‬ﺑﺮﻧﺎﻣﺞ ﯾﻄﺮح ﻋﺪدﯾﻦ ﺑﺪون اﺳﺘﺨﺪام ﻋﻤﻠﯿﺔ اﻟﻄﺮح؟‬
‫‪ -١١‬ﺑﺮﻧﺎﻣﺞ ﯾﻀﺮب ﻋﺪدﯾﻦ ﺑﺪون اﺳﺘﺨﺪام ﻋﻤﻠﯿﺔ اﻟﻀﺮب؟‬
‫‪ -١٢‬ﺑﺮﻧﺎﻣﺞ ﯾﺪﺧﻞ ﻣﺠﻤﻮﻋﺔ ﻣﻦ اﻻﻋﺪاد اﻟﺴﺎﻟﺒﺔ واﻟﻤﻮﺟﺒﺔ وﯾﻘﻮم ﺑﺠﻤﻊ اﻟﺴﺎﻟﺒﺔ وﺑﺠﻤﻊ اﻟﻤﻮﺟﺒﺔ ﻛﻞ ﻋﻠﻰ ﺣﺪه‪.‬‬
‫‪ -١٣‬ﺑﺮﻧﺎﻣﺞ ﻻﯾﺠﺎد ﻣﺠﻤﻮع ﻣﺮاﺗﺐ ﻋﺪد ﻛﺎﻟﺘﺎﻟﻲ اﻟﻌﺪد ‪ ١٢٣‬ﻣﺠﻤﻮع ﻣﺮاﺗﺒﮫ ﯾﺴﺎوي‪.٦‬‬
‫‪ -١٤‬ﺑﺮﻧﺎﻣﺞ ﻟﺮﺳﻢ ﺟﺪول‪.‬‬
‫‪ -١٥‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ اﻟﺸﻜﻞ اﻟﺘﺎﻟﻲ‪:‬‬

‫)‪programming in language c++ all student academic(2010-2011m‬‬
‫‪By: T. wael qasem sutaih – hodidah university – college zabid‬‬
‫‪38‬‬
‫‪And college bagel . email:waelsp3@yahoo.com.‬‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
39
And college bagel . email:waelsp3@yahoo.com.

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
40
And college bagel . email:waelsp3@yahoo.com.

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
41
And college bagel . email:waelsp3@yahoo.com.

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
42
And college bagel . email:waelsp3@yahoo.com.

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
43
And college bagel . email:waelsp3@yahoo.com.

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
44
And college bagel . email:waelsp3@yahoo.com.

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

:٢ ‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ ﻋﻨﺎﺻﺮ اﻟﻤﺼﻔﻮﻓﺔ ﺑﻌﺪ ﺿﺮﺑﮭﺎ ﻓﻲ اﻟﻌﺪد‬

#include<iostream.h>
#include<conio.h>
main()
{

clrscr();

int i;
int a[5]={5,8,1,9,2};
for(i=0;i<=4;i++)
{cout<<a[i]*2<<endl;}
getch();
}

‫وﻟﻜﻦ اﻻدﺧﺎل ﻣﻦ ﻗﺒﻞ اﻟﻤﺴﺘﺨﺪم‬٢ ‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ ﻋﻨﺎﺻﺮ اﻟﻤﺼﻔﻮﻓﺔ ﺑﻌﺪ ﺿﺮﺑﮭﺎ ﻓﻲ اﻟﻌﺪد‬

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{

clrscr();

int i,n;
int a[5];
cout<<"pls ent size arr: "<<setw(4);
cin>>n;cout<<endl;
for(i=1;i<=n;i++)
{cout<<"enter number : "<<i<<" "<<setw(4);
cin>>a[i];
cout<<i<<"*2="<<setw(4)<<a[i]*2<<endl;}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
45
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫ اﻋﺪد ﯾﺪﺧﻠﮭﺎ اﻟﻤﺴﺘﺨﺪم ﻓﻲ ﻣﺼﻔﻮﻓﺔ اﺣﺎدﯾﺔ‬٥ ‫ﺑﺮﻧﺎﻣﺞ ﻻﯾﺠﺎد ﻣﺮﺑﻊ‬
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{ clrscr();
int i,n;
int a[5];
cout<<"pls ent size arr: "<<setw(4);
cin>>n;cout<<endl;
for(i=1;i<=n;i++)
{cout<<"enter number : "<<i<<" "<<setw(4);
cin>>a[i];
cout<<setw(6)<<a[i]<<"*"<<a[i]<<"
="<<setw(4)<<a[i]*a[i]<<endl;}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
46
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

:‫ﺑﺮﻧﺎﻣﺞ ﻟﺠﻤﻊ ﻣﺼﻔﻮﻓﺘﯿﻦ اﺣﺎدﯾﺘﯿﻦ وﺧﺰن اﻟﻨﺎﺗﺞ ﻓﻲ ﻣﺼﻔﻮﻓﺔ ﺛﺎﻟﺜﺔ‬

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{ clrscr();
int i,n;
int a[5],b[5],c[5];
cout<<"pls ent size arr 1: "<<setw(4);
cin>>n;cout<<endl;
for(i=1;i<=5;i++)
{cout<<"enter items of a[i] number:"<<i<<" "<<setw(4);
cin>>a[i];}
cout<<"pls ent size arr 2: "<<setw(4);
cin>>n;cout<<endl;
for(i=1;i<=n;i++)
{cout<<"enter items of b[i] number:"<<i<<" "<<setw(4);
cin>>b[i];}
cout<<endl;
cout<<"a[i] = [ ";
for(i=1;i<=n;i++)
{cout<<a[i]<<" ";}
cout<<" ]";
cout<<endl<<endl<<"b[i] = [ ";
for(i=1;i<=n;i++)
{ cout<<b[i]<<" ";}
cout<<" ]"<<endl<<endl;
for(i=1;i<=n;i++)
c[i]=a[i]+b[i];
cout<<endl<<"c[i] = a[i] + b[i] = [ ";
for(i=1;i<=n;i++)
{
cout<<c[i]<<" ";}
cout<<" ]";
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
47
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

#include<iostream.h>
#include<conio.h>
main()
{clrscr();
int k=0,i,j,a[5];
for(i=1;i<=5;i++)
{cin>>a[i];}
for(i=1;i<=5;i++)
for(j=1;j<=5;j++)
if(a[i]>a[j]){
k=a[i];
a[i]=a[j];
a[j]=k;}

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

(‫ﺑﺮﻧﺎﻣﺞ ﻟﺘﺮﺗﯿﺐ ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ اﺣﺎدﯾﺔ)ﺗﺤﻘﻘﻖ ﻣﻦ ﺻﺤﺔ اﻟﺒﺮﻧﺎﻣﺞ ﺑﺘﻨﻔﯿﺬه ﻋﻠﻰ اﻟﺠﮭﺎز‬

for(i=1;i<=5;i++)
{
cout<<a[i];}
getch();
}

‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ اﺣﺎدﯾﺔ وﻃﺒﺎﻋﺔ أﺻﻐﺮ ﻗﯿﻤﺔ ﻓﻲ اﻟﻤﺼﻔﻮﻓﺔ‬

#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int min,i,a[5];
min=a[1];
cout<<"pls enter item arr a[5]:"<<endl;
for(i=1;i<=5;i++)
{cin>>a[i];}
for(i=1;i<=5;i++)
if(min>a[i])
min=a[i];
cout<<"min item in arr a[5]: = "<<min<<endl;
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
48
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

:‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ اﺣﺎدﯾﺔ وﻃﺒﺎﻋﺔ أﺻﻐﺮ ﻗﯿﻤﺔ وأﻛﺒﺮ ﻗﯿﻤﺔ ﻓﻲ ﻣﺼﻔﻮﻓﺔ‬
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int max,min,z,i,j,a[5];
min=a[1];
max=a[1];
cout<<"pls enter item arr a[5]:"<<endl;
for(i=1;i<=5;i++)
{cin>>a[i];}
for(i=1;i<=5;i++)
if(min>a[i])
min=a[i];
cout<<"min item in arr a[5]: = "<<min<<endl;
for(i=1;i<=5;i++)
if(max<a[i])
max=a[i];
cout<<"max item in arr a[5]: ="<<max<<endl;
getch();
}

‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ اﺣﺎدﯾﺔ وﻃﺒﺎﻋﺔ أﺻﻐﺮ ﻗﯿﻤﺔ وأﻛﺒﺮ ﻗﯿﻤﺔ وﻃﺒﺎﻋﺔ ﻣﺠﻤﻮع اﻟﻌﺪدﯾﻦ‬
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int max,min,z,i,j,a[5];
min=a[1];
max=a[1];
cout<<"pls enter item arr a[5]:"<<endl;
for(i=1;i<=5;i++)
{cin>>a[i];}
for(i=1;i<=5;i++)
if(min>a[i])
min=a[i];
cout<<"min item in arr a[5]: =
"<<min<<endl;
for(i=1;i<=5;i++)
if(max<a[i])
max=a[i];
cout<<"max item in arr a[5]: =
"<<max<<endl;
cout<<"sum max item and min item = "
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
49
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

:‫ وﻣﺎ آﻟﯿﺔ ﻋﻤﻞ اﻟﺒﺮﻧﺎﻣﺞ‬: ‫اﻛﺘﺐ ﺧﺮج اﻟﺒﺮﻧﺎﻣﺞ اﻟﺘﺎﻟﻲ‬
#include<iostream.h>
#include<conio.h>
main()
{clrscr();
int i,j,k,f, max=0;
int a[8]={5,10,90,6,7,8,80,2};
for(i=0;i<8;i++)
{
cout<<a[i]<<"\t";}
cout<<"\n";
cout<<endl;
for(i=4;i<8;i++)
{
if(max<a[i])
max=a[i];
}
cout<<"max="<<max;
getch();
}

:ً‫ﺑﺮﻧﺎﻣﺞ ﯾﺮﺗﺐ ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﻓﻘﺎﻋﯿﺎ‬

#include"iostream.h"
#include"conio.h"
int a[6]= {6,5,7,3,2,1};
int main()
{ clrscr();
cout<<" {6,5,7,3,2,1}"<<endl;
int j,i,m,x;
label:m=0;
for(i=0;i<5;i++)
{
if(a[i]>a[i+1])
{
x=a[i];
a[i]=a[i+1];
a[i+1]=x;
m+=1;
cout<<"flag= "<<m<<ends<<ends;
for(j=0;j<6;j++)cout<<a[j];cout<<endl;
}
}
if(m>0)
{
goto label;
}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
50
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫ﺑﺮﻧﺎﻣﺞ ﻟﻠﺒﺤﺚ ﻋﻦ ﻋﻨﺼﺮ واﺣﺪ ﻋﻠﻰ اﻷﻗﻞ ﻓﻲ ﻣﺼﻔﻮﻓﺔ اﺣﺎدﯾﺔ‬
#include<iostream.h>
#include<conio.h>
main()
{ clrscr() ;
int size=10;
int a[10];
int m,number,y=0;
cout<<"pls enter item array"<<endl;
for(m=0;m<size;m++)
{cin>>a[m];}
cout<<"pls enter number searching "<<endl;
cin>>number;
cout<<endl<<"_____________________"<<endl;
for(m=0;m<size;++m)
if (a[m]==number)
{
cout<<a[m];
y=y+1;
}
if(y==0)
cout<<"not found"<<endl;
else
cout<<endl<<"found"<<" "<<y<<"
"<<"numbers";
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
51
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

:‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ ﺛﺎﻟﺚ أﻛﺒﺮ ﻗﯿﻢ ﻓﻲ ﻣﺼﻔﻮﻓﺔ أﺣﺎدﯾﺔ‬
#include<iostream.h>
#include<conio.h>
main()

‫ ﻋﻨﺪﻣﺎ ﺗﻮد اﯾﺠﺎد ﺛﺎﻧﻲ او ﺛﺎﻟﺚ او راﺑﻊ‬: ‫ﻣﻼﺣﻈﺔ‬

{ clrscr();

....................................... ‫اﻛﺒﺮ او اﺻﻐﺮ ﻗﯿﻤﺔ ﯾﺠﺐ‬

int i,j,q,m;
int a[8]={7,1,3,4,6,2,8,5};
for(i=0;i<8;i++)
{
cout<<a[i]<<" ";}
cout<<" "<<"\n";
for(i=0;i<8;i++)
for(j=0;j<8;j++)
if(a[i]>a[j])
{
q=a[i];
a[i]=a[j];
a[j]=q;
}
for(i=0;i<8;i++)
{cout<<a[i]<<" ";}
cout<<endl;
for(i=0;i<8;i++)
if (i==2)
cout<<endl<<"3 max val this>> "<<a[i];
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
52
And college bagel . email:waelsp3@yahoo.com.

‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات ‪ c++‬ﻋﻤﻠﻲ‬

‫ﺗﻤﺎرﯾﻦ‬

‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم ‪ -‬ﺑﺎﺟﻞ‬

‫إﻋﺪاد أ‪ .‬واﺋﻞ ﺳﻄﯿﺢ‪٢٠١٣-٢٠١٢‬م‬

‫واﺟﺐ ﯾﺴﻠﻢ اﻻﺳﺒﻮع اﻟﻘﺎدم )ﻣﻨﻔﺬ ﻋﻠﻰ اﻟﻤﺘﺮﺟﻢ ( وﺗﺴﻠﻢ ﻧﺴﺨﺔ ورﻗﯿﺔ وﻧﺴﺨﺔ اﻟﻜﺘﺮوﻧﯿﺔ ﻋﻠﻰ ‪CD‬‬

‫‪ -١‬ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ اﺣﺎدﯾﺔ وﻃﺒﺎﻋﺔ اﻟﻌﻨﺼﺮ اﻷﻛﺜﺮ ﺗﻜﺮارا وﻋﺪد ﻣﺮات اﻟﺘﻜﺮار)واﺟﺐ(‬
‫‪ -٢‬ﺑﺮﻧﺎﻣﺞ ﻟﻤﺒﺎدﻟﺔ أول ﻋﻨﺼﺮ ﺑﺂﺧﺮﻋﻨﺼﺮ)واﺟﺐ(‬
‫‪ -٣‬ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ وﻃﺒﺎﻋﺔ ﻣﺠﻤﻮع) اﻛﺒﺮ ﻋﺪد زوﺟﻲ ﻣﻊ اﻛﺒﺮ ﻋﺪد ﻓﺮدي( ﻣﻘﺴﻮﻣﺎً ﻋﻠﻰ‬
‫ﻣﻄﺮوح)أﺻﻐﺮ ﻋﺪد ﻓﺮدي ﻣﻊ أﺻﻐﺮ ﻋﺪد زوﺟﻲ ( ؟)واﺟﺐ(‬
‫‪ -٤‬ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ وﻃﺒﺎﻋﺔ ﻛﺎﻓﺔ ﻋﻨﺎﺻﺮ اﻟﻤﺼﻔﻮﻓﺔ ﻋﻨﺎﺻﺮ ﻓﺮدﯾﺔ‪.‬‬
‫‪ -٥‬ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاء ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ وﻃﺒﺎﻋﺔ ﻣﺠﻤﻮع )اﻛﺒﺮ ﻋﻨﺼﺮ ﻓﻲ اﻟﻨﺼﻒ اﻻﯾﻤﻦ ﻣﻊ اﻛﺒﺮ ﻋﻨﺼﺮ ﻓﻲ اﻟﻨﺼﻒ‬
‫اﻻﯾﺴﺮ ( ﻣﻘﺴﻮﻣﺎً ﻋﻠﻰ ﻣﺠﻤﻮع)اﻛﺒﺮ ﻋﺪد زوﺟﻲ ﻣﻊ اﻛﺒﺮ ﻋﺪد ﻓﺮدي ﺿﻤﻦ اﻟﻤﺼﻔﻮﻓﺔ(‪.‬‬
‫‪ -٦‬ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ اﺣﺎدﯾﺔ وﻃﺒﺎﻋﺔ اﻛﺒﺮ ﻗﯿﻤﺔ ﻓﻲ اﻟﻤﻮاﻗﻊ اﻟﺰوﺟﯿﺔ‪.‬‬
‫‪ -٧‬ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ وﻃﺒﺎﻋﺔ اﻟﻌﻨﺼﺮ اﻟﺬي ﺗﻘﺒﻞ ﻛﻞ ﻋﻨﺎﺻﺮ اﻟﻤﺼﻔﻮﻓﺔ اﻟﻘﺴﻤﺔ ﻋﻠﯿﮫ‪.‬‬
‫‪ -٨‬ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺘﯿﻦ اﺣﺎدﯾﺘﯿﻦ وﻃﺒﺎﻋﺔ ﻣﺠﻤﻮع اﻟﻤﺼﻔﻮﻓﺘﯿﻦ ﺑﺪون اﺳﺘﺨﺪام ﻋﻤﻠﯿﺔ اﻟﺠﻤﻊ‪.‬‬
‫‪ -٩‬ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺘﯿﻦ اﺣﺎدﯾﺘﯿﻦ ودﻣﺠﮭﻤﺎ ﻓﻲ ﻣﺼﻔﻮﻓﺔ واﺣﺪة‪.‬‬
‫‪ -١٠‬ﺑﺮﻧﺎﻣﺞ ﯾﻮﻟﺪ ﺳﻠﺴﻠﺔ ﻓﺎﺑﯿﻮﻧﺴﻲ ﺑﺎﺳﺘﺨﺪام ﻣﺼﻔﻮﻓﺔ اﺣﺎدﯾﺔ‪.‬‬

‫)‪programming in language c++ all student academic(2010-2011m‬‬
‫‪By: T. wael qasem sutaih – hodidah university – college zabid‬‬
‫‪53‬‬
‫‪And college bagel . email:waelsp3@yahoo.com.‬‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫اﻟﻤﺼﻔﻮﻓﺎت اﻟﺜﻨﺎﺋﯿﺔ‬

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
54
And college bagel . email:waelsp3@yahoo.com.

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫أﻣﺜــــــــــــــــــﻠﺔ‬
‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ ﻣﺠﻤﻮع ﻋﻨﺎﺻﺮھﺎ‬

#include<iostream.h>
#include<conio.h>
main()
{ clrscr();
int i,j,q,m=0;
int a[8][8];
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
cin>>a[i][j];}
for(i=0;i<3;i++)
{for(j=1;j<3;j++)
m=m+a[i][j];
}
cout<<"sum = "<<m;
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
55
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ وﻃﺒﺎﻋﺔ اﻟﻌﻨﺎﺻﺮ ﺑﺼﻮرة ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ اﻟﻤﺠﻤﻮع‬
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{ clrscr();
int i,j,q,m=0;
int a[8][8];
cout<<"pls enter item array : "<<endl;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
cin>>a[i][j];}
cout<<"---------------"<<endl;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{cout<<a[i][j]<<" ";}
cout<<endl;}
cout<<endl;
for(i=0;i<3;i++)
{for(j=1;j<3;j++)
m=m+a[i][j];
}
cout<<"sum array = "<<m;
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
56
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

: ‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ ﻣﻮاﻗﻊ اﻟﻌﻨﺎﺻﺮ ﻟﻠﻤﺼﻔﻮﻓﺔ اﻟﻨﺎﺋﯿﺔ‬
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{ clrscr();
int i,j;
int a[8][8];
for(i=1;i<=3;i++)
{
for(j=1;j<=3;j++)
{cout<<i<<","<<j<<" ";}
cout<<endl;}
getch();
}

:‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ ﻋﻨﺎﺻﺮ اﻟﺼﻒ اﻷول‬

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{ clrscr();
int i,j;
int a[8][8];
for(i=1;i<=3;i++)
{
for(j=1;j<=3;j++)
if(i==1)
{cout<<i<<","<<j<<" ";}
cout<<endl;}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
57
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

:‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺘﮭﺎ ﺑﺸﻜﻞ ﺛﻨﺎﺋﻲ وﻃﺒﺎﻋﺔ ﻋﻨﺎﺻﺮ اﻟﻘﻄﺮ اﻟﺮﺋﯿﺴﻲ‬

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{ clrscr();
int i,j;
int a[8][8];
cout<<"pls enter item array : "<<endl;
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
cin>>a[i][j];}
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
{cout<<a[i][j]<<" ";}
cout<<endl;}
cout<<endl<<"----------"<<endl;
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
if(i==j)
{cout<<a[i][j]<<" ";}
else{cout<<" ";}
cout<<endl;}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
58
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

:‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺘﮭﺎ ﺑﺸﻜﻞ ﺛﻨﺎﺋﻲ وﻃﺒﺎﻋﺔ اﻟﻌﻨﺎﺻﺮ أﻋﻠﻰ اﻟﻘﻄﺮ اﻟﺮﺋﯿﺴﻲ‬

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{ clrscr();
int i,j;
int a[8][8];
cout<<"pls enter item array : "<<endl;
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
cin>>a[i][j];}
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
{cout<<a[i][j]<<" ";}
cout<<endl;}
cout<<endl<<"----------"<<endl;
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
if(i<j)
{cout<<a[i][j]<<" ";}
else{cout<<" ";}
cout<<endl;}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
59
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

:‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺘﮭﺎ ﺑﺸﻜﻞ ﺛﻨﺎﺋﻲ وﻃﺒﺎﻋﺔ ﻋﻨﺎﺻﺮ اﻟﻘﻄﺮ اﻟﺜﺎﻧﻮي‬

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{ clrscr();
int i,j;
int a[8][8];
cout<<"pls enter item array : "<<endl;
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
cin>>a[i][j];}
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
{cout<<a[i][j]<<" ";}
cout<<endl;}
cout<<endl<<"----------"<<endl;
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
if(i+j==5)
{cout<<a[i][j]<<" ";}
else{cout<<" ";}
cout<<endl;}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
60
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

: ‫ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ ﺣﺎﺻﻞ اﻟﻔﺮق ﺑﯿﻦ ﻣﺠﻤﻮع ﻋﻨﺎﺻﺮ اﻟﻘﻄﺮ اﻟﺮﺋﯿﺴﻲ وﻣﺠﻤﻮع ﻋﻨﺎﺻﺮ اﻟﻘﻄﺮ اﻟﺜﺎﻧﻮي‬

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
main()
{ clrscr();
int i,j,m=0,n=0;
int a[8][8];
cout<<"pls enter item array : "<<endl;
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
cin>>a[i][j];}
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
{cout<<a[i][j]<<" ";}
cout<<endl;}
cout<<endl<<"----------"<<endl;
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
if(i==j)
{
cout<<a[i][j]<<" ";m=m+a[i][j];}
else{cout<<" ";}
cout<<endl;}
cout<<endl<<endl;
for(i=1;i<=4;i++)
{
for(j=1;j<=4;j++)
if(i+j==5)
{
cout<<a[i][j]<<" "; n=n+a[i][j];}
else{cout<<" ";}
cout<<endl<<endl;}
cout<<"sum 1 : = "<<m<<endl;
cout<<"sum 2 : = "<<n<<endl;
cout<<"sub sum1 and sum2 = "<<m-n;
getch();
}
programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
61
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

‫ﺑﺮﻧﺎﻣﺞ ﻟﻤﺒﺎدﻟﺔ ﻋﻨﺎﺻﺮ اﻟﻘﻄﺮ اﻟﺮﺋﯿﺴﻲ ﺑﻌﻨﺎﺻﺮ اﻟﻘﻄﺮ اﻟﺜﺎﻧﻮي‬
#include<iostream.h>
#include<conio.h>
main()
{clrscr();
int i,j,t,c,p,r,s,m;
int a[3][3]={1,2,3,4,1,5,3,8,1};
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cout<<a[i][j]<<"\t";}
cout<<"\t"<<"\n";}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
if(i==j&&i+j!=2)
{
p=a[i][j];
c=i;
t=j;}
if(i+j==2&&i!=j)
{
r=a[i][j];
s=i;
m=j;
}
}
a[s][m]=p;
a[c][t]=r;
}
cout<<"\n";
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cout<<a[i][j]<<"\t";}
cout<<"\t"<<"\n";}
getch();
}
programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
62
And college bagel . email:waelsp3@yahoo.com.

}

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

: ‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ ﻣﺪور ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ‬

#include<iostream.h>
#include<conio.h>
main()
{ clrscr();
int i,j,t,c,p,r,s,m;
int a[3][3]={1,2,3,4,5,6,7,8,9};
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cout<<a[i][j]<<"\t";}
cout<<"\t"<<"\n\n";}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cout<<a[j][i]<<"\t";
}
cout<<"\n";
}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
63
And college bagel . email:waelsp3@yahoo.com.

‫م‬٢٠١٣-٢٠١٢‫ واﺋﻞ ﺳﻄﯿﺢ‬.‫إﻋﺪاد أ‬

‫ ﺑﺎﺟﻞ‬- ‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم‬

‫ ﻋﻤﻠﻲ‬c++ ‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات‬

: ‫ﺑﺮﻧﺎﻣﺞ ﻟﻄﺒﺎﻋﺔ ﻣﺤﯿﻂ ﻣﺼﻔﻮﻓﺔ‬

include<iostream.h>
#include<conio.h>
main()
{ clrscr();
int i,j;
int a[4][4]={1,2,3,4,5,6,7,8,9,1,8,6,2,9,7,3};
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
{
cout<<a[i][j]<<"\t";}
cout<<"\t"<<"\n";}
cout<<"\n";
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
{
if(i==0||j==0||i==3||j==3)
{
cout<<a[i][j]<<"\t";
}
else{
cout<<"

";}

}
cout<<"\t"<<"\n";
}
getch();
}

programming in language c++ all student academic(2010-2011m)
By: T. wael qasem sutaih – hodidah university – college zabid
64
And college bagel . email:waelsp3@yahoo.com.

‫ﺑﺮاﻣﺞ ﻟﻐﺔ اﺟﺮاءات ‪ c++‬ﻋﻤﻠﻲ‬

‫ﻣﺴﺘﻮى ﺛﺎﻧﻲ ﻣﻌﻠﻢ ﺣﺎﺳﻮب ﻛﻠﯿﺔ اﻟﺘﺮﺑﯿﺔ واﻟﻌﻠﻮم ‪ -‬ﺑﺎﺟﻞ‬

‫إﻋﺪاد أ‪ .‬واﺋﻞ ﺳﻄﯿﺢ‪٢٠١٣-٢٠١٢‬م‬

‫ﺗﻤﺎرﯾﻦ ‪:‬‬
‫‪ -١‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ اﻟﻤﺘﻮﺳﻂ اﻟﺤﺴﺎﺑﻲ‪.‬‬
‫‪ -٢‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺘﯿﻦ ﺛﻨﺎﺋﯿﺘﯿﻦ وﻃﺒﺎﻋﺔ ﻣﺠﻤﻮع ﻋﻨﺎﺻﺮ اﻟﻘﻄﺮاﻟﺮﺋﯿﺲ ﻟﻠﻤﺼﻔﻮﻓﺔ‬
‫اﻻوﻟﻰ ﻣﻊ ﻣﺠﻤﻮع ﻋﻨﺎﺻﺮ اﻟﻘﻄﺮ اﻟﺜﺎﻧﻮي ﻟﻠﻤﺼﻔﻮﻓﺔ اﻟﺜﺎﻧﯿﺔ‪.‬‬
‫‪ -٣‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ اﻟﻌﻨﺎﺻﺮ أﻋﻠﻰ اﻟﻘﻄﺮ اﻟﺜﺎﻧﻮي‪.‬‬
‫‪ -٤‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ اﻟﻌﻨﺎﺻﺮ أﺳﻔﻞ اﻟﻘﻄﺮ اﻟﺜﺎﻧﻮي‪.‬‬
‫‪ -٥‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ أﻛﺒﺮ ﻋﺪد ﻓﻲ اﻟﻘﻄﺮ اﻟﺮﺋﯿﺴﻲ وﺟﻤﻌﮫ ﻣﻊ أﻛﺒﺮ ﻋﺪد‬
‫ﻓﻲ اﻟﻌﻨﺎﺻﺮ اﻋﻠﻰ اﻟﻘﻄﺮ اﻟﺜﺎﻧﻮي‪.‬‬
‫‪ -٦‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ‬
‫‪ -٧‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﯾﻮﻟﺪ ﻣﺼﻔﻮﻓﺔ اﻟﻮﺣﺪة‪.‬‬
‫‪ -٨‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﯾﻮﻟﺪ اﻟﻤﺼﻔﻮﻓﺔ اﻟﺴﺤﺮﯾﺔ‬
‫‪ -٩‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ اﻟﻌﻨﺎﺻﺮ ذات اﻟﻤﻮاﻗﻊ اﻟﻮزﺟﯿﺔ‪.‬‬
‫‪ -١٠‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﺗﺤﻮﯾﻞ ﻛﻞ ﻋﺪد زوﺟﻲ اﻟﻰ ﻋﺪد ﻓﺮدي‪.‬‬
‫‪ -١١‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻣﺒﺎدﻟﺔ ﻗﯿﻢ اﻟﻤﻮاﻗﻊ اﻟﻔﺮدﯾﺔ ﺑﻘﯿﻢ اﻟﻤﻮاﻗﻊ اﻟﺰوﺟﯿﺔ‪.‬‬
‫‪ -١٢‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ ﻣﺤﺪد ﻣﺼﻔﻮﻓﺔ‪.‬‬
‫‪ -١٣‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ واﺳﺘﺨﺮاج ﻋﻨﺎﺻﺮ اﻟﺼﻒ اﻻول وﻋﻨﺎﺻﺮ اﻟﺼﻒ اﻻﺧﯿﺮ اﻟﻰ‬
‫ﻣﺼﻔﻮﻓﺘﯿﻦ اﺣﺎدﯾﺘﯿﻦ واﯾﺠﺎد اﻟﻔﺮق ﺑﯿﻨﮭﻢ‪.‬‬
‫‪ -١٤‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ ﺛﻨﺎﺋﯿﺔ وﻃﺒﺎﻋﺔ اﻻس اﻟﺜﺎﻟﺚ ﻟﻠﻤﺼﻔﻮﻓﺔ‪.‬‬
‫‪ -١٥‬اﻛﺘﺐ ﺑﺮﻧﺎﻣﺞ ﻟﻘﺮاءة ﻋﻨﺎﺻﺮ ﻣﺼﻔﻮﻓﺔ وﻃﺒﺎﻋﺔ ﻣﻀﺮوب ﻛﻞ ﻋﻨﺼﺮ داﺧﻞ اﻟﻤﺼﻔﻮﻓﺔ‪.‬‬

‫)‪programming in language c++ all student academic(2010-2011m‬‬
‫‪By: T. wael qasem sutaih – hodidah university – college zabid‬‬
‫‪65‬‬
‫‪And college bagel . email:waelsp3@yahoo.com.‬‬

Sign up to vote on this title
UsefulNot useful