initial
This commit is contained in:
commit
2802401eee
79 changed files with 2650 additions and 0 deletions
37
1sem/programming basics/3/0.cpp
Normal file
37
1sem/programming basics/3/0.cpp
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// pb_3_0.cpp
|
||||
// Горбацевич Андрей
|
||||
#include <stdio.h>
|
||||
#include <cmath>
|
||||
#include <clocale>
|
||||
#include <afxres.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
SetConsoleCP(CP_UTF8);
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
setlocale(LC_ALL, "ru_RU.UTF-8");
|
||||
|
||||
double phi = 1.618033988749894848204586834365638117720309179805762862135;
|
||||
|
||||
cout.width(20);
|
||||
cout << phi << endl;
|
||||
|
||||
cout.precision(20);
|
||||
cout << phi << endl;
|
||||
|
||||
cout.precision(3);
|
||||
cout.width(20);
|
||||
cout.fill('_');
|
||||
cout << phi << endl;
|
||||
|
||||
cout.fill('_');
|
||||
cout.width(30);
|
||||
cout.setf(ios_base::left);
|
||||
cout << phi << endl;
|
||||
cout.fill('_');
|
||||
cout.width(30);
|
||||
cout.setf(ios_base::right);
|
||||
cout << phi << endl;
|
||||
}
|
||||
20
1sem/programming basics/3/1.cpp
Normal file
20
1sem/programming basics/3/1.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// pb_3_1.cpp
|
||||
// Горбацевич Андрей
|
||||
#include <stdio.h>
|
||||
#include <cmath>
|
||||
#include <clocale>
|
||||
#include <afxres.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
SetConsoleCP(CP_UTF8);
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
setlocale(LC_ALL, "ru_RU.UTF-8");
|
||||
|
||||
double x1, y1, x2, y2, x3, y3;
|
||||
printf("x1 y1 x2 y2 x3 y3 >>>");
|
||||
scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3);
|
||||
bool ool = ((x2-x1)*(y3-y1) == (y2-y1)*(x3-x1));
|
||||
printf(ool? "YES" : "NO");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue