#include <iostream>
#include <math.h>
#define PI 3.14159
int main()
{
using namespace std;
float a,b,result;
cin>>a>>b;
float result=a+b;
cout<<"Slozhenie a+b = "<<result<<endl;
result=a-b;
cout<<"Raznost a-b ="<<result<<endl;
result=a*b;
cout<<"a*b ="<<result<<endl;
result=a/b;
cout<<"a/b ="<<result<<endl;
result=sin(a*PI/180); //для а в градусах
cout<<"sin(a gradusov) ="<<result<<endl;
result=sin(b); //для b радиан
cout<<"sin(b radian) ="<<result<<endl;
result=sqrt(a*b); //квадратный корень перемножения а*б
cout<<"sqrt(a*b) ="<<result<<endl;
return 0;
}
#define N 10
int main() {
setlocale(LC_ALL, "Rus");
int mas[N];
cout << "Исходный массив: ";
for (int i = 0; i < N; i++) {
cin >> mas[i];
for (int j = 0; j < N-1; j++) {
if (mas[j] > mas[j + 1]){
int d = mas[j];
mas[j] = mas[j + 1];
mas[j + 1] = d;
cout << "\nОтсортированный массив: ";
for (int i = 0; i < N; i++)
cout << mas[i] << " ";
#include <iostream>
#include <math.h>
#define PI 3.14159
int main()
{
using namespace std;
float a,b,result;
cin>>a>>b;
float result=a+b;
cout<<"Slozhenie a+b = "<<result<<endl;
result=a-b;
cout<<"Raznost a-b ="<<result<<endl;
result=a*b;
cout<<"a*b ="<<result<<endl;
result=a/b;
cout<<"a/b ="<<result<<endl;
result=sin(a*PI/180); //для а в градусах
cout<<"sin(a gradusov) ="<<result<<endl;
result=sin(b); //для b радиан
cout<<"sin(b radian) ="<<result<<endl;
result=sqrt(a*b); //квадратный корень перемножения а*б
cout<<"sqrt(a*b) ="<<result<<endl;
return 0;
}
#define N 10
#include <iostream>
using namespace std;
int main() {
setlocale(LC_ALL, "Rus");
int mas[N];
cout << "Исходный массив: ";
for (int i = 0; i < N; i++) {
cin >> mas[i];
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < N-1; j++) {
if (mas[j] > mas[j + 1]){
int d = mas[j];
mas[j] = mas[j + 1];
mas[j + 1] = d;
}
}
}
cout << "\nОтсортированный массив: ";
for (int i = 0; i < N; i++)
cout << mas[i] << " ";
return 0;
}