Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello I need help with this simple C++ program. I need to the contents of the void function in int main() as well make the

Hello I need help with this simple C++ program. I need to the contents of the void function in int main() as well make the program more simple. Thanks.

Requirements;

image text in transcribed

Code:

#include #include using namespace std;

void position(float x , float y){ cout0) cout0) cout0 && y>0) cout0) cout0 && y

int main(){ float XArr[] = {1.2,-5.0,-0.8,0.0,-4.5,0.1,0.0,0.0,-1.6}; float YArr[] = {1.8,0.0,3.0,-2.0,-7.2,-3.8,12.2,0.0,0.0}; int size = sizeof(XArr)/sizeof(float); for(int i=0;i Write a program that takes the X-Y coordinates of a point in the Cartesian system and displays a message telling either an axis on which the point lies or the quadrant in which it is found. The program should include entries for points located at the origin of the coordinate system and points located on the positive or negative side of an axis. Origin X III IV The program should display the original points and the answers based on the format shown in the following lines of outputs: (-1.0, -2.0) is in quadrant III (0.0, 2.5) is on positive Yaxis (0.0, 0.0) is at the origin Test your program for the following points: 1.2 - 5.0 - 0.8 0.0 - 4.5 0.1 - 3.8 12.2 0.0 0.0 - 1.6 0.0 0.0

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

Step: 3

blur-text-image

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

Describe the seven standard parts of a letter.

Answered: 1 week ago

Question

Explain how to develop effective Internet-based messages.

Answered: 1 week ago

Question

Identify the advantages and disadvantages of written messages.

Answered: 1 week ago