Advertisement
Ne-Biolog

Untitled

Apr 23rd, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include<iostream>
  2. #include <fstream>
  3. #include <stdlib.h>
  4.  
  5. using namespace std ;
  6. double main()
  7. {
  8. double a[10];
  9. ifstream read_file ("input.txt");
  10. ofstream write_file ("output.txt");
  11. int b,i ,k ;
  12. k=0;
  13. for (i=0;i<10;i++)
  14. {
  15. read_file>>a[i];
  16. if ((abs(a[i]))>7)
  17. {
  18. k++;
  19. }
  20. else ;
  21. }
  22. write_file << k << "\n"<<endl;
  23. return 0 ;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement