Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication2.cpp: определяет точку входа для консольного приложения.
- //
- #include <iostream>
- #include <cmath>
- using namespace std;
- bool P(double a[6][7], double c) {
- for (int i = 0; i < 6; i++) {
- for (int j = 0; j < 7; j++) {
- if (a[i][j] > c) {
- return false;
- }
- }
- }
- int counter = 0;
- for (int i = 0; i < 6; i++) {
- for (int j = 0; j < 7; j++) {
- if (a[i][j]*a[i][j] < 11.2 && sin(a[i][j]) < 0.5) {
- counter++;
- }
- }
- }
- cout << counter << endl;
- return true;
- }
- int main()
- {
- double a[6][7], c;
- cin >> c;
- for (int i = 0; i < 6; i++) {
- for (int j = 0; j < 7; j++) {
- cin >> a[i][j];
- }
- }
- cout << P(a, c);
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement