GATEverse
← GATE CSE 2000

Q14

MCQMarks unknown

Consider the line y=nmxy=\frac{n}{m}x, where nn and mm are positive integers. 1: function clash (m, n, p, q, r, s: integer): Boolean; 2: begin 3: clash = false; 4: if(m*q - n*p)⊏⊐ 0 then clash:= true; 5: if(m*s - n*r)⊏⊐ 0 then clash:= true; 6: if(m*q - n*p)⊏⊐ 0 and (m*s - n*r)⊏⊐ 0 then clash:= true; 7: if(m*q - n*p)⊏⊐ 0 and (m*s - n*r)⊏⊐ 0 then clash:= true; 8: end;

Sign in to save attempts.

Loading…