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 4 quadrants Q1,Q2,Q3,Q4.A robot is placed at the center of the plane i.e ., at 0,0 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 i.e., distance moved in x & y direction.
For each query x,y:
1.if x is a positive ,the robot moves in the direction of +ve X-axis else it moves in the direction of -ve X-axis.
2.1.if y is a positive ,the robot moves in the direction of +ve Y-axis else it moves in the direction of -ve Y-axis.
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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!