Tutorial 4 KE17503 (print).pdf - KE 17503 Engineering Programming 1920(1 Tutorial 4 1 Determine if the following conditions are true or false Assume

# Tutorial 4 KE17503 (print).pdf - KE 17503 Engineering...

• Homework Help
• 2

This preview shows page 1 - 2 out of 2 pages.

KE 17503 Engineering Programming 1920(1) Tutorial 4 1) Determine if the following conditions are true or false. Assume that the following variables have been declared and given these values: a = 5.7, b = 1.1 and k = -3. a) k != a – b b) a < 10 && a > 5 c) –k <= k + 6 d) ! (a == 3 * b + 1) e) Write a program indicates the conditions in 1(a) to 1(d) whether true or false. 2) Write the complement expression for the following original expression. a) !(x < y) b) !(x >= y) c) !(x == 3 * y - 1) d) !(x/y != x/3) e) Given that x and y are integers with the value of 8 and 3 respectively. Write a program shows the condition (1 or 0) of the original expression is same with its complement expression. 3) De Morgan’s Rule governs the complementing of operators when we want to make the total expression positive by removing the parentheses. Consider the expression shown below. !(x || y && !z || !t || !u && x) a) What is the complementing of operators for the expression? b) Given that x = y = 0, z = 100, t = -4 and u = 1. What is the condition for the given expression?

Subscribe to view the full document.

• Summer '16

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern