Dodano zadania z drugich zajęć laboratorium.
This commit is contained in:
10
Laboratorium/20221012161651/kwadratowe.cpp
Normal file
10
Laboratorium/20221012161651/kwadratowe.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
|
||||
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;
|
||||
}
|
||||
7
Laboratorium/20221012161651/liniowe.cpp
Normal file
7
Laboratorium/20221012161651/liniowe.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <iostream>
|
||||
int main(void)
|
||||
{
|
||||
int a,b,c;
|
||||
std::cin >> a >> b >> c;
|
||||
std::cout << (c - b ) / a << std::endl;
|
||||
}
|
||||
9
Laboratorium/20221012161651/suma.cpp
Normal file
9
Laboratorium/20221012161651/suma.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <iostream>
|
||||
int main()
|
||||
{
|
||||
int a,b;
|
||||
a = 42;
|
||||
b = 7;
|
||||
std::cout << a+b << std::endl;
|
||||
return 0;
|
||||
}
|
||||
9
Laboratorium/20221012161651/suma_input.cpp
Normal file
9
Laboratorium/20221012161651/suma_input.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <iostream>
|
||||
int main(void)
|
||||
{
|
||||
int a,b;
|
||||
std::cin >> a >> b;
|
||||
std::cout << a+b << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
11
Laboratorium/20221012161651/uklad.cpp
Normal file
11
Laboratorium/20221012161651/uklad.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <iostream>
|
||||
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.
|
||||
}
|
||||
Reference in New Issue
Block a user