Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- //zadacha 10
- int main() {
- // a
- double n;
- cin >> n;
- bool task = (n / 3 && n / 5 || n / 2 && n / 7);
- cout << boolalpha << task << endl;
- return 0;
- //b
- double a, b, c;
- cin >> a;
- cin >> b;
- cin >> c;
- double discriminant = (b * b) - 4 * a * c;
- bool task = (discriminant >= 0);
- cout << boolalpha << task << endl;
- return 0;
- //v
- double a, b, radius = 5;
- cin >> a;
- cin >> b;
- bool task = (a == -1 && b == 2 && radius == 5);
- cout << boolalpha << task << endl;
- return 0;
- //g
- double x, y, radius;
- cin >> x;
- cin >> y;
- cin >> radius;
- bool task = (x > 0 && y > 0 && radius == 7);
- cout << boolalpha << task << endl;
- return 0;
- //d
- double x, y, radius1, radius2;
- cin >> x;
- cin >> y;
- cin >> radius1;
- cin >> radius2;
- bool task = (x != 0 && y != 0 && radius1 != 1 && radius2 != 5);
- cout << boolalpha << task << endl;
- return 0;
- //e
- double startPoint, endPoint, x;
- cin >> startPoint;
- cin >> endPoint;
- cin >> x;
- bool task = (x >= startPoint && x <= endPoint);
- cout << boolalpha << task << endl;
- return 0;
- //j
- double a, b, c, x;
- cin >> a;
- cin >> b;
- cin >> c;
- cin >> x;
- double smallestFromABC;
- if (fmin(a,b) < fmin(b,c) < fmin(a,c))
- {
- smallestFromABC = fmin(a, b);
- }
- else if (fmin(b,c) < fmin(a,b) < fmin(a,c))
- {
- smallestFromABC = fmin(b, c);
- }
- else if (fmin(a,c)< fmin(a,b) < fmin(b,c))
- {
- smallestFromABC = fmin(a, c);
- }
- bool task = (x == smallestFromABC);
- cout << boolalpha << task << endl;
- return 0;
- //z
- double a, b, c, x;
- cin >> a;
- cin >> b;
- cin >> c;
- cin >> x;
- bool task = (x != fmin(a, b) && x != fmin(b, c) && x != fmin(a, c));
- cout << boolalpha << task << endl;
- return 0;
- //i
- bool x, y;
- cin >> x;
- cin >> y;
- bool task = (x == false && y == false);
- cout << boolalpha << task << endl;
- return 0;
- //y
- double a, b, c;
- cin >> a;
- cin >> b;
- cin >> c;
- bool task = (a > 0 || b > 0 || c > 0);
- cout << boolalpha << task << endl;
- return 0;
- //k
- int n;
- cout << "Enter a four-digit number: ";
- cin >> n;
- if (n > 999)
- {
- bool task = (n % 5 == 0);
- cout << boolalpha << task << endl;
- }
- else
- {
- cout << "Your number is less than the minimum requirement!" << endl;
- }
- return 0;
- //l
- int n;
- cout << "Enter a four-digit number: ";
- cin >> n;
- int rem, rem1;
- vector<int> arr;
- if (n > 999)
- {
- for (int i = 1; i <= 4; i++)
- {
- rem1 = n % 10;
- n = n / 10;
- arr.push_back(rem1);
- }
- int a, b, c, d;
- a = arr[0];
- b = arr[1];
- c = arr[2];
- d = arr[3];
- if (a == b || a == c || a == d)
- {
- cout << "True" << endl;
- }
- else if (b == c || b == d)
- {
- cout << "True" << endl;
- }
- else if (c == d)
- {
- cout << "True" << endl;
- }
- else
- {
- cout << "False" << endl;
- }
- }
- else
- {
- cout << "Your number is less than the minimum requirement!" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement