Advertisement
rygyfygy

Zad 13.1

May 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int xa[100],ya[100],xb[100],yb[100],xc[100],yc[100];
  8.     int i, liczba=0;
  9.    
  10.     ifstream plik "wspolrzedne.txt";
  11.    
  12.     for (i=0; i<100; i++){
  13.         plik>>xa[i]>>ya[i]>>xb[i]>>yb[i]>>xc[i]>>yc[i];
  14.        
  15.         if ((xa[i]>0) && (ya[i]>0) && (yb[i]>0) && (xc[i]>0) && (yc[i]>0)){
  16.             liczba++;
  17.         }
  18.            
  19.     }
  20. cout<<"Liczba w I cwiartce: \n" << liczba;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement