- تاريخ التسجيل
- 14 سبتمبر 2012
- المشاركات
- 2,834
- العمر
- 28
- المجموعة
- ذكر
- الدفعة الدراسية
- 2012
- الكلية
- كلية تقنية المعلومات
- التخصص
- CS - متقاعد
هاي المطلوب
كود:[B][U]PART A[/U][/B] Write a function readRainFall() that takes parameter a two-dimensional array named, [B]figures[/B] of size 4 x 7. The function should read rainfall figures week by week and store them in the array figures in which each row represent a week and each column represent a day. [B][U]PART B[/U][/B] Write a function [B]generateReport()[/B] that displays the total rainfall for each week and the most wettest day. The function takes as parameter a two-dimensional array named, [B]figures[/B] of size 4 x 7, that contains rainfall figures in which each row represent a week and each column represent a day. For example, if the array contains the following rainfall data: [TABLE="align: center"] [TR] [TD][/TD] [TD="colspan: 7"]Days[/TD] [/TR] [TR] [TD][/TD] [TD]0[/TD] [TD]1[/TD] [TD]2[/TD] [TD]3[/TD] [TD]4[/TD] [TD]5[/TD] [TD]6[/TD] [/TR] [TR] [TD]Week 0[/TD] [TD]3[/TD] [TD]0[/TD] [TD]0[/TD] [TD]7[/TD] [TD]8[/TD] [TD]21[/TD] [TD]0[/TD] [/TR] [TR] [TD]Week 1[/TD] [TD]0[/TD] [TD]1[/TD] [TD]1[/TD] [TD]0[/TD] [TD]0[/TD] [TD]0[/TD] [TD]4[/TD] [/TR] [TR] [TD]Week 2[/TD] [TD]9[/TD] [TD]6[/TD] [TD]7[/TD] [TD]0[/TD] [TD]0[/TD] [TD]0[/TD] [TD]0[/TD] [/TR] [TR] [TD]Week 3[/TD] [TD]0[/TD] [TD]0[/TD] [TD]0[/TD] [TD]0[/TD] [TD]0[/TD] [TD]0[/TD] [TD]1[/TD] [/TR] [/TABLE] Then the output of the function should be displayed as follows: [TABLE="align: left"] [TR] [TD][/TD] [/TR] [TR] [TD][/TD] [TD][TABLE="width: 100%"] [TR] [TD]Week Rainfall data Total 1 2 3 4 5 6 7 1 3 0 0 7 8 21 0 39 2 0 1 1 0 0 0 4 6 3 9 6 7 0 0 0 0 22 4 0 0 0 0 0 0 1 1 Wettest Week 3 3 3 1 1 1 2 [/TD] [/TR] [/TABLE] [/TD] [/TR] [/TABLE] [B][U]PART C[/U][/B] Write a main function to call the above functions in PART A and B.
اعتقد المثال اللي حاطينه فيه غلط ..
الفروض على حسب السؤال
يبي في البداية تطلع المجموع مال كل اسبوع و في الأخير تطبع wettest day يعني عليك تحدد اليوم بسfunction generateReport() that displays the total rainfall for each week and the most wettest day