Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
دورة لغة ++C الدرس الثامن

دورة لغة ++C الدرس الثامن

Ratings: (0)|Views: 15|Likes:
Published by tarigggg

More info:

Published by: tarigggg on Dec 17, 2009
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





ميحرلا نحرلا هلا مسب
.......هتاكربو ل ةمحو يع سل دع نب دم ل ءاش  ايفشو ايحو اتودق نيرمو ءاي ض ىع سو صو لدم.......نيمج هو ه ىعو ...... ل  تخو تخ  ةيت مجأ و اد رثكو ر مج رشو و ن همج رب ل ءاش  ي أد for loop....ا  ذخت همج 
for (initial value;condition;increment or decrement) {your statment}
 ا   ظحfor ني خو اب او امك اضت   ; ةع ءزج ك  .ر اي خد ر ك  ار اذف  درت  رط ضت 1-)initial valueهم  د ا طي  ةد ةط  ا: (for  ظح :اث هيئدب ةميق هئاطع اض يطستو دك هدس ذ ريغم رت  يطست ءز ذint i=0ريغم ارع اثم ذ  ظحiي دع هاب intو هيئدب هميق ايطع اضو 0. 2-)condition:اث ا  دع د ادع ق  دعا ت ا : (i<=10 ن رك دع ى ص ادع د ق او 10 اما د  رمس  iواس و ن ق .ر3-)
increment or decrement
و دعاصت د ريس  در يك  ا : ( ات increment or decrementاث i ةميق دز ++iو دحو دمب ر ك i--  ةميق  i.دحو دمب : رثك هم ذ ض ا اثم  ن دع ةعاطب  ارب اثم ذ و 1ى10: ا  ىع 12345678910
>>>>>>ار ى  و 
#include <iostream>using std::cout;using std::endl;int main(){for ( int counter = 1; counter <= 10; counter++ )cout << counter << endl;return 0;}
: ار رش  داب هباب ةا ةيق ط وات  ار ةباك whileرطس  ثم هاب ارو اfor ( int counter = 1; counter <= 10; counter ( ++ ةم ا  ةد  احرش امك ظح for ريغم د دس counter ةيئد هميق و  دحو int counter = 1رع قر د وا ادع د ذ ادع ق  دعا اج ادبو,counter <= 10 ةميق دز او,counter .ر ك  دحو دمب   ةميقو د أدي  بات counter =1  ديو دعا ن دكا ادعcounter<10ةميق دزيو  counter رطس زو دحو دمب cout << counter << endl;قر طو 1ر ر خد   قر  دكو رخ2 دزو ر ن قأcounter ط  دحو دمب 2ص  ى و    ن دكا رع قر ىدcounter واس و ن قأ رع هميق و ذ10ا او,  دز ر واس counter  ن ار رو ر طو دحو دمب for  counter  واست هميق 11د ةيمو ة ح , ا ار  هاسب ب حت امكو.for .: رخآ مع اث ى   م ةعاطب  ارب ةباك طم100هج ىعو ط نيب هج ق او ا :عاو 
#include <iostream>using std::cout;using std::endl;int main(){float total=0,max=0,min=100,avg;for ( int counter = 1; counter <= 100; counter++ ){ cout << "enter the grade" << endl;cin>>grade;total=total+grade;if(grade<max){ max=grade;}

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->