This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = 14* 10 % Частота дискредизации | |
t = 0:1/fs:5 %временной промеуток | |
x = sin(pi*14*) % формула волны | |
plot(t,x) % строим график |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program min3; | |
var | |
a, b, c: integer; | |
begin | |
Write('Введите первое число: '); | |
ReadLn(a); | |
Write('Введите второе число: '); | |
ReadLn(b); | |
Write('Введите третье число: '); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <sys/ipc.h> | |
#include <stdio.h> | |
#include <sys/msg.h> | |
#include <stdlib.h> | |
#include <signal.h> | |
#define TYPE_MSG 1 | |
typedef void signalfunction(int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int binarySearch(int* arr, int value, int left, int right) { | |
while (left <= right) | |
{ | |
int middle = (left + right) / 2; | |
if (arr[middle] == value) return middle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
СAP3-3280 | |
ПAЗ_4234 | |
ПАЗ_4230 | |
ПАЗ_3206 | |
ПAЗ_3205 | |
НефАЗ_5299 | |
МАРЗ_5266 | |
МАРЗ_42191-01 | |
МАРЗ_4251 | |
МАЗ_104С |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
y = 0.3; | |
z = 3.8; | |
xvec = -1:0.3:2; % промежуток х | |
R = 0; % это временная переменная, здесь будем считать R для каждого аргумента | |
Rvec = []; % здесь храним значения функций. | |
for x = xvec %пробегаем по промежутку хvec, при этом каждый элемент предатсавляя как х | |
if y>x | |
R= (z*cos(z))/exp(x+y) + atan(power(1+z*z,1/3)); | |
else | |
product = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <clocale> | |
#include <iostream> | |
#include <fstream> | |
#include <conio.h> | |
#include <string> | |
#include <windows.h> | |
using namespace std; | |
struct turist | |
{ | |
string surname; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program Project1; | |
// Лаба 1 | |
uses math; | |
var | |
x : real = -4.5; | |
y : real = 0.75; | |
z : real = 0.84; | |
a : real; | |
b : real; | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 13. Написать функцию rand_sum(N, M) на языке MATLAB, которая возвращает вектор из | |
% N сумм, каждая из которых состоит из M случайных слагаемых, равномернораспределённых в интервале [0; 1]. | |
function B = rand_sum(N, M) % объявляем функцию rand_sum в которую передается N и M, и возвращает она B | |
rng('shuffle') % инициализируем генератор случайных чисел | |
B = sum(randn(M,N)); % присваиваем B результат суммы случайно сгенерированной матрицы размером M а N | |
end % закрываем объявление функции |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class c4_5{ | |
public static void main(String[] args){ | |
Integer N = new Scanner(System.in).nextInt(); | |
TreeSet<Integer> num = new TreeSet<>(); //treeset for exclude duplicates | |
for(int i = 0; i < N; i++) num.add(Integer.parseInt(new Scanner(System.in).nextLine().split(" ")[2].substring(7))); //parse to num only 2 last int | |
System.out.println(num.size()/N); | |
} | |
} |