Advertisement
Guest User

Untitled

a guest
Nov 21st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. using namespace std;
  4.  
  5. struct punkt{
  6. double x;
  7. double y;
  8. };
  9.  
  10. int wyznacz(punkt tab, int n){
  11. for (int i=0; i<n ; i++){
  12.  
  13.  
  14.  
  15. }
  16.  
  17. return;
  18. }
  19.  
  20. void wczytaj(punkt tab[],int n){
  21. for(int i=0; i<n; i++){
  22. cout << "wczytaj x pkt " << i+1 << endl;
  23. cin >> tab[i].x;
  24. cout << "wczytaj y pkt " << i+1 << endl;
  25. cin >> tab[i].y;
  26. }
  27.  
  28.  
  29. return;
  30. }
  31.  
  32.  
  33.  
  34. int main(){
  35. int n;
  36. punkt *tab;
  37. cout << "n = ";
  38. cin >> n;
  39. tab = new punkt[n];
  40. wczytaj(tab , n);
  41.  
  42.  
  43.  
  44. delete [] tab;
  45. return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement