عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 24-03-2010, 05:09 PM

شاديــــه شاديــــه غير متواجد حالياً

جامعي

 
تاريخ التسجيل: Mar 2010
نوع الدراسة: إنتظام
المستوى: السادس
الجنس: أنثى
المشاركات: 4
افتراضي الله يسعدكم ساعدوني بالهبرنامجين


(if .. else)

1:
Write a program that receives the user's Age and Gender (female=f, male=m) , then :
- If the user age is less than or equal 14 and he is male , prints: (You are a Boy Child)
- If the user age is less than or equal 14 and she is female , prints: (You are a Girl Child)
- If 14 < the user age <=24 and he is male , prints: (You are a Young Man)
- If 14 < the user age <=24 and she is female , prints: (You are a Young Woman)
- If 24 < the user age <=64 and he is male , prints: (You are an Adult Man)
- If 24 < the user age <=64 and she is female , prints: (You are an Adult Woman)
- If the user age is greater than 64 and he is male , prints: (You are a Senior Man)
- If the user age is greater than 64 and she is female , prints: (You are a Senior Woman)
.............

2:
Write a program that works as ( Temperature Converter) . this program receive the temperature from the user and its unit (Fahrenheit=f , Celsius=c).

- If the unit is f(Fahrenheit) convert from Fahrenheit to Celsius .

o &ordm;C = (&ordm;F - 32) / 1.8 = 23

- If the unit is c(Celsius) convert from Celsius to Fahrenheit .

o &ordm;F= (&ordm;C x 1.8) +32

رد مع اقتباس