1. Здесь передается значение "t" из 1 формулы во вторую:
import math
m = float(input('m = '))
b = float(input('b = '))
c = float(input('c = '))
t = float(input('t = '))
t = math.sqrt(m*(math.tan(math.radians(t))) + math.fabs(c * math.sin(math.radians(t
z = m * math.cos(math.radians(b * t * math.sin(math.radians(t + c
print(t)
print(z)
2. Здесь передается изначально значение "t" из 1 формулы во вторую в виде "t1":
import math
m = float(input('m = '))
b = float(input('b = '))
c = float(input('c = '))
t = t1 = float(input('t = '))
t = math.sqrt(m*(math.tan(math.radians(t))) + math.fabs(c * math.sin(math.radians(t
z = m * math.cos(math.radians(b * t1 * math.sin(math.radians(t1 + c
print(t)
print(z)
#include <iostream>
#include <conio.h>
#include <cstdlib>
#include <ctime>
using namespace std;
void Function()
{
int number;
srand(time(0));
cout << "Введите число" << endl;
for (;;)
{
cin >> number;
if (number == 0)
{
break;
}
for (;;)
{
int x = rand();
if (x < number)
{
cout << x << endl;
break;
}
}
}
}
int main()
{
setlocale(LC_ALL, "Russian");
Function();
_getch();
return 0;
}
Объяснение:
Подбирает каждай раз рандомное число , пока оно не станет меньше чем ввел пользователь. (Отрицательные числа не вводить, т.к rand генерирует только положительные, хотя можно и подшаманить чтобы генерировал отрицательные)