CyberSlug Rules!

Beginner Programming CMPS060

Prof. Paulo Franca

Home

Syllabus

Login

Objects

Download

Staff only

 

if( (x==1) || (y<0)) k=1;

k will be one if x is equal to 1 or y is negative;

if( (x>y) || (y>0) && (x<0) ) k = 5;

k will be 5 if x is greater than y; also, k will be 5 if the next two conditions are true: y is positive and x is negative.

if ( (x==0) && ( ! (y>3)) ) k=8

k will be 8 if x is zero and the condition y greater than 3 is not true. In other words: x is zero and y is less or equal to 3.