C++
# include <iostream>
# include <windows.h>
# include <cmath>
# include <iomanip>
# include <fstream>
using namespace std;
int main()
{
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
unsigned char C;
int kod;
cout << "Введите символ С: ";
cin >> C;
kod = C;
cout << "Код символа '" << C << "': " << kod << endl;
system ("pause");
return 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <math.h>
using namespace std;
void main()
{
float p, a, b, c, L, M, H, R_op, R_vp;
cout << "a="; cin>>a;
cout << "b="; cin>>b;
cout << "c="; cin>>c;
p=(a+b+c)/2; //найдём полупериметр
H=(2/a)*sqrt(p*(p-a)*(p-b)*(p-c)); // найдём длину высоты треугольника
M=(1/2)*sqrt(2*a*a+2*b*b-c*c); //найдём длину медианы треугольника
L=(2*sqrt(a*b*p*(p-c)))/(a+b); // найдём длину биссектрисы треугольника
R_op=(a*b*c)/(4*sqrt(p*(p-a)*(p-b)*(p-c))); // найдём радиус описанной окружности треугольника
R_vp=sqrt(((p-a)*(p-b)*(p-c))/p); // найдёи радиус вписанной окружности в треугольник
cout << "Dlina visoti= " << H << endl;
cout << "Dlina mediani= " << M << endl;
cout << "Dlina bissektrisi= " << L << endl;
cout << "Rad.op.okr.= " << R_op << endl;
cout << "Rad.vp.okr.= " << R_vp << endl;
system("PAUSE >> VOID");
}
C++
# include <iostream>
# include <windows.h>
# include <cmath>
# include <iomanip>
# include <fstream>
using namespace std;
int main()
{
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
unsigned char C;
int kod;
cout << "Введите символ С: ";
cin >> C;
kod = C;
cout << "Код символа '" << C << "': " << kod << endl;
system ("pause");
return 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# include <iostream>
# include <windows.h>
# include <cmath>
# include <iomanip>
# include <fstream>
using namespace std;
int main()
{
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
unsigned char C;
int kod;
cout << "Введите символ С: ";
cin >> C;
kod = C;
cout << "Код символа '" << C << "': " << kod << endl;
system ("pause");
return 0;
}