View difference between Paste ID: B9CXNBwF and DF2Cpn5T
SHOW: | | - or go back to the newest paste.
1-
#include "stdafx.h"
1+
2
#include <stdio.h>
3
4
5
6-
float _sin(int a, int  b);
6+
float _sin(float a, float  b);
7
8
int main()
9
{
10
	/*переменные   а-первый катет, b-второй, c-гипонетуза*/
11
	float a, b, sin;
12
	printf("Protivopolognaya storona!");
13-
	scanf("%d", &a);
13+
	scanf_s("%d", &a);
14
	getchar();
15
	printf("Gipotenyza");
16-
	scanf("%d", &b);
16+
	scanf_s("%d", &b);
17
	getchar();
18
	printf("%f", _sin(a, b));
19
	getchar();
20
21
22
}
23
/*функция*/
24
float _sin(float a, float b)
25
26
{
27
	float sin;
28
	sin = a / b;
29
	return sin;
30
}