عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 02-05-2012, 04:22 PM
الصورة الرمزية ميم 28

ميم 28 ميم 28 غير متواجد حالياً

Amerah

 
تاريخ التسجيل: Sep 2010
نوع الدراسة: إنتظام
المستوى: الثالث
الجنس: أنثى
المشاركات: 192
افتراضي أتمنى احد يساعدني في حل السوال هذاا ...


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

Write a program that reads a one-line sentence as input and then displays the following response: If the sentence ends with a question mark (?) and the input contains an even number of characters, display the word Yes. If the sentence ends with a question mark and the input contains an odd number of characters, display the word No. If the sentence ends with an exclamation point (!), display the word Wow. In all other cases, display the words You always say followed by the input string enclosed in quotes. Your output should all be on one line. Be sure to note that in the last case, your output must include quotation marks around the echoed input string. In all other cases, there are no quotes in the output. Your program does not have to check the input to see that the user has entered a legitimate sentence.

Notes:
This project requires a three-way selection statement and gives more practice with string methods. The case statement can be used since the control expression is a single character.




وشكرا مقدما
رد مع اقتباس