Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cstdlib>
- using namespace std;
- int i=0, j=0;
- int main()
- {
- ifstream myfile("dane.txt");
- if(!myfile.good() && !myfile.open()) {cout << "Fuck!"; exit(0);}
- int numbers[320], counter=0;
- while(myfile >> numbers[i]){
- if(i==319){
- for(j=0; j<320; j++){
- if(numbers[j] != numbers[319-j])
- {counter++; break;}
- }
- i=0;
- }else
- i++;
- }
- cout << counter;
- myfile.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment