هذا المثال .. اذا طلع الناتج صفر الخطوات صحيحه ..
حساب مجموع ومعدل ثلاث درجات طلبه في ماده الحاسب بحيث تدخل الدرجات من المستخدم ؟
#inclde <iostrem>
Using name space std ;
int main( )
نحط علامة قوس مجموعه مفتوح بس مو موجود ب زر جوالي (: ..
float m1, m2 , m3, sum=0 Av=0;
\\ Enter three marks from user cout <<" n Enter first mark:"; cin>>m2;
Cout <<"/n seond mark:";
Cin>>m2;
Cout <<"/n Enter third mark:";
Cin>>m3;
//compute to ta 1 and average
Sum=m1+m2+m3
Av= tota 1 / 3.0;
Cout <<"/ntoa1 of three marks = "<<sum;
Cout<<"/n Average of three marks ="<<Av;
return0;
اغلق قوس المجموعه ..
وبالتوفيق #