عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 05-10-2012, 04:16 AM   #12

Wejdan Hamad

جامعي

الصورة الرمزية Wejdan Hamad

 
تاريخ التسجيل: Sep 2011
التخصص: CS
نوع الدراسة: إنتظام
المستوى: الخامس
الجنس: أنثى
المشاركات: 264
افتراضي رد: مساعدة في برمجة 202

المشاركة الأصلية كتبت بواسطة -esraa- مشاهدة المشاركة



problem 3:

many private water wells produce only 1 or 2 gallons of water per minute. One way to avoid running out of water with these low-yield wells is to use a holding tank. A family of 4 will use about 250 gallons of water per day. However, there is a “natural” water holding tank in the casing (i.e. The hole) of the well itself. The deeper the well, the more water that will be stored that can be pumped out for household use. But how much water will be available?

write a program that allows the user to input the radius of the well casing in inches (a typical well will have a 3 inch radius) and the depth of the well in feet (assume water will fill this entire depth, although in practice that will not be true since the static water level will generally be 50 feet or more below the ground surface). The program should output the number of gallons stored in the well casing. For your reference:

the volume of a cylinder is where r is the radius and h is the height.
1 cubic foot = 7.48 gallons of water.

for example, a 300 foot well full of water with a radius of 3 inches for the casing holds about 441 gallons of water -- plenty for a family of 4 and no need to install a separate holding tank.

notes:

this project gives the student practice with numerical calculations and simple input/output. Introduces problem solving with relatively straightforward conversion of units. Students are likely to encounter data type conversion issues from double to int and vice versa (e.g. Radius / 12 will result in 0 if radius is an int).

وبس نقرتين لعرض الصورة في صفحة مستقلةنقرتين لعرض الصورة في صفحة مستقلة

ممكن احد يشرح السؤال

 

Wejdan Hamad غير متواجد حالياً   رد مع اقتباس