Error: Слишком мало аргументов в вызове функции - C (СИ)
Формулировка задачи:
#include <stdio.h>
#include <math.h>
float s_tr(float ax, float ay, float bx, float by, float cx, float cy, float dx, float dy)
{
float S;
S = fabs((bx-ax)*(ay+by)+(cx-bx)*(cy+by)+(ax-cx)*(cy+ay))/2;
return S;
}
float stor(float ax, float ay, float bx, float by, float cx, float cy, float dx, float dy)
{
float st;
st=fabs(sqrt((bx-ax)*(bx-ax)+(by-ay)*(by-ay)));
return st;
}
float dlin( float s, float s2, float s3, float ab, float bc, float ac)
{
float h;
h=2*s/ab;
return h;
}
int main()
{
float ax, ay, bx, by, cx, cy, dx, dy;
float s, s2, s3;
float ab, bc, ac;
float da, db, dc;
scanf ("%f %f %f %f %f %f %f %f", &ax, &ay, &bx, &by, &cx, &cy, &dx, &dy);
s=s_tr(ax, ay, dx, dy, bx, by);
s2=s_tr(bx, by, dx, dy, cx, cy);
s3=s_tr(cx, cy, dx, dy, ax, ay);
ab=stor(ax, ay, bx, by);
bc=stor(bx, bc, cx, cy);
ac=stor(ax, ay, cx, cy);
da=(s, ab);
db=(s2, bc);
dc=(s3, ac);
if (da<db && dc)
printf ("%4.f", da);
else
if (db< da && dc)
printf ("%4.f", db);
else
printf ("%4.f", dc);
return 0;
}Решение задачи: «Error: Слишком мало аргументов в вызове функции»
textual
Листинг программы
bc=stor(bx, bc, cx, cy);