Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- fabs(x);
- int cwiartka(double x,double y, double r) //funkcja sprawdza, w ktorej cwiartce znajduje sie okrag
- {
- if(r <=0.0) return 0;
- if(r >= fabs(x) || r >= fabs(y)) return 0;
- if(x > 0 && y > 0) return 1;
- if(x < 0 && y > 0) return 2;
- if(x < 0 && y < 0) return 3;
- return 4;
- }
- void zadanie1()
- {
- int p[5] = {0,0,0,0,0};
- for (int i=0; i<2000; i++)
- p[cwiartka(x[i],y[i],r[i])]++;
- cout << "\nZadanie 1\n";
- for (int i=1; i<=4; i++)
- cout << "Cwiartka" << i << " : "<<p[i]<<"\n";
- cout << "pozostale okregi : " << p[0] << "\n";
- }
- bool CzyParaLustrzana(double x1, y1, double r1, double x2 double y2, double r2)
- {
- if(r1 != r2) return false;
- if(x1 = x2 && y1 == -y2) return true;
- if(y1 = y2 && x1 == -x2) return true;
- return false;
- }
- int main()
- {
- return 0;
- }
Add Comment
Please, Sign In to add comment