diff --git a/Laboratorium/20221012161651/kwadratowe.cpp b/Laboratorium/20221012161651/kwadratowe.cpp new file mode 100644 index 0000000..bf8996e --- /dev/null +++ b/Laboratorium/20221012161651/kwadratowe.cpp @@ -0,0 +1,10 @@ +#include +#include + +int main(void) +{ + int a, b, c; + std::cin >> a >> b >> c; + double delta = b * b - 4 * (a * c); + std::cout << "x wynosi:" << (-1 * b - std::sqrt(delta)) / (2 * a) << " oraz " << (-1 * b + std::sqrt(delta)) / (2 * a) << std::endl; +} diff --git a/Laboratorium/20221012161651/liniowe.cpp b/Laboratorium/20221012161651/liniowe.cpp new file mode 100644 index 0000000..9d8e8a4 --- /dev/null +++ b/Laboratorium/20221012161651/liniowe.cpp @@ -0,0 +1,7 @@ +#include +int main(void) +{ + int a,b,c; + std::cin >> a >> b >> c; + std::cout << (c - b ) / a << std::endl; +} diff --git a/Laboratorium/20221012161651/suma.cpp b/Laboratorium/20221012161651/suma.cpp new file mode 100644 index 0000000..d60ddee --- /dev/null +++ b/Laboratorium/20221012161651/suma.cpp @@ -0,0 +1,9 @@ +#include +int main() +{ + int a,b; + a = 42; + b = 7; + std::cout << a+b << std::endl; + return 0; +} diff --git a/Laboratorium/20221012161651/suma_input.cpp b/Laboratorium/20221012161651/suma_input.cpp new file mode 100644 index 0000000..68b5ad8 --- /dev/null +++ b/Laboratorium/20221012161651/suma_input.cpp @@ -0,0 +1,9 @@ +#include +int main(void) +{ + int a,b; + std::cin >> a >> b; + std::cout << a+b << std::endl; + return 0; +} + diff --git a/Laboratorium/20221012161651/uklad.cpp b/Laboratorium/20221012161651/uklad.cpp new file mode 100644 index 0000000..dbfbb1d --- /dev/null +++ b/Laboratorium/20221012161651/uklad.cpp @@ -0,0 +1,11 @@ +#include +int main(void) +{ + int x,y; + int a1, a2; + int b1, b2; + int c1, c2; + + // here lies peter, he failed miserably. + // system of equations killed him rapidly. +}