Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<stdlib.h>
- #include<math.h>
- using namespace std;
- int main()
- {
- double x, y, a = 0, b = 0, c = 0, d = 0;
- for (int i=0; i < 3; ++i)
- {
- cout << "Enter x=" << endl;
- cin >> x;
- cout << "Enter y= " << endl;
- cin >> y;
- if (x > 0 && y > 0)
- {
- ++a;
- cout << "the First";
- }
- else if (x < 0 && y>0)
- {
- ++b;
- cout << "the Second";
- }
- else if (x < 0 && y < 0)
- {
- ++c;
- cout << "the Third quarter";
- }
- else if (x > 0 && y > 0)
- {
- ++d;
- cout << "the Fourth quarter";
- }
- }
- cout << "FIRST= " << a << "\tSecond= " << b << "\tThird= " << c << "\tThourth= " << d<<endl;
- int MAX = 0;
- if (MAX < a)
- {
- MAX = a;
- }
- if (MAX < b)
- {
- MAX = b;
- }
- if (MAX < c)
- {
- MAX = c;
- }
- if (MAX < d)
- {
- MAX = d;
- }
- cout << "max=" <<MAX<< endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement