st Case 1- Input is 1 1 and   expected output-Quadrant 1 Test Case 2- Input is 0 0 and   expected output-Origin Test Case 3-Input is -32 -13 and expected output-Quadrant 3 Test Case 6-Input is 3 0 and expected output-Positive X Test Case 7-Input is 0 -8 and expected output-Negative Y Test Case 8-Input is -6 0 and expected output-Negative X Test Case 9-Input is 0 12 and expected output- Positi

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

main.c

Test Case 1- Input is 1 1 and   expected output-Quadrant 1

Test Case 2- Input is 0 0 and   expected output-Origin

Test Case 3-Input is -32 -13 and expected output-Quadrant 3

Test Case 6-Input is 3 0 and expected output-Positive X

Test Case 7-Input is 0 -8 and expected output-Negative Y

Test Case 8-Input is -6 0 and expected output-Negative X

Test Case 9-Input is 0 12 and expected output- Positive Y

 

 

7. Which Quadrant?
main.c
by Jundith Alterado
1
Listen up soldier! I've got men on the battlefield and they need to know
their places ASAP! However, I only have their coordinates and I can't tell
them which part of the battlefield they have to go to! Your job is to tell
them which quadrant they have to go to so that they can position
themselves already!
Coordinates:
Origin = both x and y are 0
Quadrant 1 = both x and y are (+)
Quadrant 2 = x (-) and y (+)
Quadrant 3 = both x and y are (-)
Quadrant 4 = x (+) and y (-)
Positive X = x (+) and y is 0
Positive Y = x is 0 and y (+)
Negative X = x (-) and y is 0
Negative Y = x is 0 and y (-)
Input Format
A single line containing two integers representing x and y.
Input Sample
1.1
Output Format
Custom Input
Output
Test Cases
The quadrant they are located in.
O Test Case 3
Output Sample
O Test Case 4 Hidden
Quadrant 1
Transcribed Image Text:7. Which Quadrant? main.c by Jundith Alterado 1 Listen up soldier! I've got men on the battlefield and they need to know their places ASAP! However, I only have their coordinates and I can't tell them which part of the battlefield they have to go to! Your job is to tell them which quadrant they have to go to so that they can position themselves already! Coordinates: Origin = both x and y are 0 Quadrant 1 = both x and y are (+) Quadrant 2 = x (-) and y (+) Quadrant 3 = both x and y are (-) Quadrant 4 = x (+) and y (-) Positive X = x (+) and y is 0 Positive Y = x is 0 and y (+) Negative X = x (-) and y is 0 Negative Y = x is 0 and y (-) Input Format A single line containing two integers representing x and y. Input Sample 1.1 Output Format Custom Input Output Test Cases The quadrant they are located in. O Test Case 3 Output Sample O Test Case 4 Hidden Quadrant 1
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY