Dodano zadania z drugich zajęć laboratorium.

This commit is contained in:
2022-10-12 17:14:28 +02:00
parent 174156a1c7
commit c0c5842cd8
5 changed files with 46 additions and 0 deletions

View 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;
}

View 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;
}

View File

@@ -0,0 +1,9 @@
#include <iostream>
int main()
{
int a,b;
a = 42;
b = 7;
std::cout << a+b << std::endl;
return 0;
}

View 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;
}

View 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.
}