Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. // ConsoleApplication2.cpp: определяет точку входа для консольного приложения.
  2. //
  3.  
  4. #include <iostream>
  5. #include <cmath>
  6.  
  7. using namespace std;
  8.  
  9. bool P(double a[6][7], double c) {
  10. for (int i = 0; i < 6; i++) {
  11. for (int j = 0; j < 7; j++) {
  12. if (a[i][j] > c) {
  13. return false;
  14. }
  15. }
  16. }
  17. int counter = 0;
  18. for (int i = 0; i < 6; i++) {
  19. for (int j = 0; j < 7; j++) {
  20. if (a[i][j]*a[i][j] < 11.2 && sin(a[i][j]) < 0.5) {
  21. counter++;
  22. }
  23. }
  24. }
  25. cout << counter << endl;
  26. return true;
  27. }
  28.  
  29.  
  30. int main()
  31. {
  32. double a[6][7], c;
  33. cin >> c;
  34. for (int i = 0; i < 6; i++) {
  35. for (int j = 0; j < 7; j++) {
  36. cin >> a[i][j];
  37. }
  38. }
  39. cout << P(a, c);
  40.  
  41. _getch();
  42.  
  43. return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement