12-03-2010, 03:00 PM
|
#2
|
تاريخ التسجيل: Jul 2008
كلية: كلية الحاسبات وتقنية المعلومات
التخصص: IT
نوع الدراسة: عضو هيئة تدريس
المستوى: متخرج
البلد: جــــدة
الجنس: ذكر
المشاركات: 2,477
|
رد: برمجه بليز احد يساعدني
كود:
Answer the following exercises
1. Evaluate the following expressions using the relational operators
and the ASCII Collating Sequence (express your answer with true
or false).
Expression Expression Value
’ ’ <’a’
Answer : True
’R’ > ’t’
Answer : False
’+’ > ’*’
Answer : False
’6’ >= ’>’
Answer : False
!(’A’ > ’B’)
Answer : True
!(6 <= 7)
Answer : False
(14 >= 5 ) && (’A’ < ’B’)
Answer : True
(24 >=35) && ( 7 < 9 )
Answer : False
(’A’ <+ ’a’) || ( 7 != 7 )
Answer : True
_____________________________
2. Suppose we have the following declarations:
bool found = true ;
bool flag = false ;
int num = 1 ;
double x = 3.4 ;
double y = 3.4 ;
int a = 5 , b = 8 ;
int n = 20 ;
char ch = ’B’;
Consider the flowing expressions state the answer for each one
(Express your answers with true or false).
Expression Answer
!found
Answer : False
x > 4.0
Answer : False
!( found && ( x >= 0 )
Answer : False
x + y <= 20.5
Answer : True
(’A’<= ch && ch <= ’Z’
Answer : True
( a + 2 <= b ) && !flag
Answer : True
___________________________________________
3. Evaluate the following expressions. Express your answer with tr or false.
Expression E
(17<4*3+5)|| (8*2 == 4*4)&& !(3 + 3== 6)
Answer : False
(6*3 == 36/2)||(13<3*3+4)&& !(6-2 < 5)
Answer : True
2 % 4 * 5 && 5 % 4 * b
Answer : True
6 * 2 == 4*3
Answer : True
5 % 2 * 4 > 5 || 4 % 2 * 5 < 7
Answer : True
_____________________________________
حل البقية في الطريق إن شاء الله
|
|
سبحان الله وبحمد ,,, سبحان الله العظيم الحمد لله كما ينبغي لجلال وجهه وعظيم سلطانه . اللهم صل على محمد وعلى آل محمد كما صليت على إبراهيم وعلى آل إبراهيم إنك حميد مجيد . اللهم بارك على محمد وعلى آل محمد كما باركت على إبراهيم وعلى آل إبراهيم إنك حميد مجيد.
|
التعديل الأخير تم بواسطة Mr.Ahmad ; 12-03-2010 الساعة 03:03 PM.
|
|
|