Facebook
From penis, 9 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 575
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5.  
  6. int main(int argc, char *argv[]) {
  7.         int x=0;
  8.         int skoki [310];
  9.         fstream plik;
  10.         plik.open("dziennik.txt",ios::in);
  11.                         for(int i=0;i<310;i++)
  12.                         {
  13.                                 plik>>skoki[i];
  14.                                 cout<<skoki[i]<<endl;
  15.                         }
  16.         plik.close();
  17.        
  18.         for(int j=0;j<310;j++)
  19.         {
  20.                 if(skoki[j]<skoki[j+1]&&skoki[j+1]<skoki[j+2]&&skoki[j+2]<skoki[j+3])
  21.                 {
  22.                         x=x+1;
  23.                 }
  24.         }
  25.        
  26.        
  27.        
  28.        
  29.         cout<<"pozytywne serie trenigowe"<<x;
  30.         return 0;
  31. }