Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions