السلام عليكم ورحمة الله وبركاته
اسال الله ان تكونوا بخير ايها الاخوة والاخوات الاكارم
واشكركم في الحقيقة على المنتدى الذي طالما استفدت منه علميا وادبيا
انا مبتدئ في لغة السي ++
وبدأت في تمرين اولي
وهو على الرابط
وكتبت بعض الاكواد واعطت نتائج جيدة
في الاخير
بدأت البنشرة :wacko:
فما دريت هل استخدم
while
او if
او for
اتمنى منكم التعاون والافادة
وهذا ان شاء الله من الحرص طلب العلم وتبادل الخبرات من بين الاخوة
وفقكم الله
:)
هذا الحل اللي سويته
include <iostream.h>
int main ()
/*This programme is written by Prof.Challenger:) */
{cout<<"Enter your 1st number:";
float int1;
cin>> int1;
cout<<"Enter your 2nd number:";
float int2;
cin>> int2;
cout<<"Enter your 3rd number:";
float int3;
cin>> int3;
cout<<"Enter your 4th number:";
float int4;
cin>> int4;
cout<<"Enter your 5th number:";
float int5;
cin>> int5;
cout<<"Enter your 6th number:";
float int6;
cin>> int6;
cout<<"Enter your estimation:";
float int7;
cin>> int7;
float product_of_int1_int2_int3_int4_int5_int6= int1*int2*int3*int4*int5*int6;
cout << "the product of" <<int1
<<"and" <<int2
<<"and" <<int3
<<"and" <<int4
<<"and" <<int5
<<"and" <<int6<<"is"
<<product_of_int1_int2_int3_int4_int5_int6;
float product_of_int7=int7*int7*int7*int7*int7*int7;
cout << "the product of" <<int7<<"is"
<<product_of_int7;
float difference_of_int8=product_of_int1_int2_int3_int4_ int5_int6-product_of_int7;
cout<<"The difference:"<<"is"
<<difference_of_int8;
if (difference_of_int8<0) {
cout << difference_of_int8 << ",";
float the_newst_difference=difference_of_int8*-1;
cout<<"The posisitve difference:"<<"is"
<<the_newst_difference;
}
return 0;
}