برامج

طلب توضيح اذا ممكن [الأرشيف] - برامج نت

المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : طلب توضيح اذا ممكن


سلامة ناصر
10-19-2006, 02:14 PM
السلام عليكم اخواني جميعا ,,

حبيت اطلب مساعدتكم في شرح وتوضيح هذا السؤال لاني مبتدا في البرمجة بالجافا وحبيت انكم تساعدوني في حل المصفوفة في هذه السؤال وشرحه ,,, ولكم جزيل الشكر

) Write a Java program to do the following: ]
a. read 10 integer numbers and store them in an array.
b. find the average of all the numbers stored in the array.
c. print the values of the array and the results of the sum, and average.
d. find the maximum number in this array

سلامة ناصر
10-20-2006, 10:15 AM
مافيه ولا رد:smailes41:

توضيح يااخوان ان شالله ماراح يتعبكم ؟؟

سلامة ناصر
10-21-2006, 11:27 AM
:smailes29:
اللي فاهم هالسؤال يشرحه لي بليززززززززززززززززز

xlogan
10-22-2006, 04:19 AM
السلام عليكم

للاسف اخي انا ما بعرف اكتب كود جافا .... اللي بعرفه انه بيشبه السي طبعا راح اساعدك بالحل . بس انت عليك تحول الكود الى لغة الجافا وان تجمع هذا الكود في برنامج واحد.

a. read 10 integer numbers and store them in an array.
b. find the average of all the numbers stored in the array.
c. print the values of the array and the results of the sum, and average.
d. find the maximum number in this array


int MyNumbers[9];
int Sum=0;
int MyMax = 0;

for ( int i = 0 ; i<10 ; i++)
cin>>MyNumbers[i];

for ( i = 0 ; i<10 ; i++)
{
Sum = Sum + MyNumbers[i];
if ( max < MyNumbers[i] ) max = MyNumbers[i];
}

cout<<" The Sum of all entries is "<<Sum<<endl;
cout<<" The Average of all entries is "<<Sum/10<<endl;
cout<<" The Max of all entries is "<<MyMax<<endl;