Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <fstream>
- #include <iso646.h>
- using namespace std;
- int main()
- {
- setlocale(0, "");
- int n = 0;
- float a, b, c, d;
- int sum = 0;
- fstream F;
- fstream G;
- fstream H;
- fstream J;
- F.open("E:\\Diplom\\SIG1\\A.txt");
- G.open("E:\\Diplom\\SIG1\\B.txt");
- H.open("E:\\Diplom\\SIG1\\C.txt");
- J.open("E:\\Diplom\\SIG1\\D.txt");
- if (F, G, H, J)
- {
- while (!F.eof(), !G.eof(), !H.eof(), !J.eof())
- {
- F >> a;
- G >> b;
- H >> c;
- J >> d;
- n++;
- if (a > b & a > c & a > d)
- {
- }
- else
- {
- sum++;
- }
- }
- F.close();
- G.close();
- H.close();
- J.close();
- cout << " Число сигналов " << n - 1 << " Количество ошибок: " << sum - 1 << endl;
- }
- else cout << "Error" << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement