Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct punkt
- {
- int x,y;
- };
- punkt licz(punkt tab[], int n)
- {
- liczx=tab[0].x;
- liczy=tab[0].y;
- for (int i=0; i<n; i++)
- {
- if (liczx<tab[i].x)
- liczx=tab[i].x;
- if (liczy>tab[i].y)
- liczy=tab[i]
- }
- }
- int main()
- {
- int n=0;
- cout<< "Podaj ilosc punktow: ";
- cin >> n;
- punkt *tab;
- tab = new punkt[n];
- for (int i =0; i<n; i++)
- {
- cout << "Podaj wspolrzedne x: "
- cin << tab[i].x
- cout << "Podaj wspolrzedne y: "
- cin << tab[i].y
- }
- delete[] tab;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement