Question: c program for There s a Cartesian plane with 4 quadrants Q 1 , Q 2 , Q 3 , Q 4 . A robot
c program for Theres a Cartesian plane with quadrants QQQQA robot is placed at the center of the plane ie at in the coordinate plane.The robot can only move in x & y directions.
You are given q queries Each query contains two values x &y ie distance moved in x & y direction.
For each query xy:
if x is a positive the robot moves in the direction of ve Xaxis else it moves in the direction of ve Xaxis.
if y is a positive the robot moves in the direction of ve Yaxis else it moves in the direction of ve Yaxis.
Your task is to determine the quadrant in which the robot lies after moving for Q times
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
