Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
//int a = 2, b = 3, c = 4, d = 5 , p = -6, q = 6; //for (int x = p; x <= q; x++) //{ // for (int y = p; y <= q; y++) // { // for (int z = p; z <= q; z++) // { // if (a*x + b*y + c*z +d == 0) // { // Console.WriteLine($"x = {x}, y = {y}, z = {z}"); // } // } // } //} FindIntegerSolutions(1, 2, 3, 4, -6, 6); static void FindIntegerSolutions(int a, int b, int c, int d, int p, int q) { Console.WriteLine($"Решения на уравнението: {a}x + {b}y + {c}z + {d} = 0 в интервала [{p},{q}]:"); bool found = false; for (int x = p; x <= q; x++) { for (int y = p; y <= q; y++) { for (int z = p; z <= q; z++) { if (a * x + b * y + c * z + d == 0) { Console.WriteLine($"x = {x}, y = {y}, z = {z}"); found = true; } } } } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)