#include <iostream> // header input/output streams
#include <fstream> // header для работы с файлами
using std::ifstream; // для работы с файлом input.txt
using std::ofstream; // для работы с файлом output.txt
using std::cin; // для работы cin
using std::cout; // для работы cout
using std::endl; // для работы перевода на новую строку endl
int main(){
ifstream in_file;
ofstream out_file;
try{
in_file.open("input.txt");
out_file.open("output.txt");
}
catch(std::exception& e){
cout << e.what() << endl;
}
unsigned int a,b;
in_file >> a >> b;
unsigned int sum = a+b -1;
cout << sum;
out_file << sum - a << ' ' << sum-b << endl;
}
Def some_func(num):
arr = []
for n in range(num):
arr.append((n+1)*(n+1))
return arr
#include <iostream>
#include <cmath>
float f(float x, float y, float z);
int main()
{
float x, y, z;
std::cout << "Введите x: ";
std::cin >> x;
std::cout << "Введите y: ";
std::cin >> y;
std::cout << "Введите z ";
std::cin >> z;
std::cout << "b=" << f(x, y, z);
}
float f(float x, float y, float z)
{
return 1 + z*z / (3 + z*z / 5) + asin(z / 4);
}