Пример #1
0
int formZ(int a,int b,int c)
{
	double xx0 = x[a]-x[b];
	double xx1 = x[c]-x[b];
	double yy0 = y[a]-y[b];
	double yy1 = y[c]-y[b];
	if(near(dian(xx0,xx1,yy0,yy1),0.0)==1)
		return 1;
		return 0;
}
Пример #2
0
int main(void)
{
    float i, j;
    printf("Please input two floats:");

    while (scanf("%f %f", &i, &j) == 2)
    {
        printf("%2.3f\n", dian(i, j));
        printf("Please input two floats:");
    }
    printf("end\n");
    return 0;
}
Пример #3
0
int main(void)
{
	int i, j;

	printf("Enter lower and upper integer limits:");

	while (scanf("%d %d", &i, &j) == 2, i != j)
	{
		printf("%d %d %d\n", i*i, j*j, dian(i, j));
		printf("Enter next set of limits:");
	}
	printf("Done\n");

	return(0);
}