Дополнен 14 лет назад
#include "stdafx.h"
#include <iostream.h>
#include "math.h"
double RIZN (double);
double PR (double);
double FUNCTION (double);
int main()
{
double D, E, F;
D=RIZN;
E=PR;
F=FUNCTION;
printf ("D=%f\n E=%f\n ", D, E); // відповідь MA=15.652476 MB=15.652476 R=-15.652476
return 0;
}
double RIZN (double)
{
int A[3];
A[0]=8;
A[1]=9;
A[2]=10;
int B[3];
B[0]=9;
B[1]=8;
B[2]=10;
double MA, MB, RIZN;
MA=sqrt(pow(A[0],2)+pow(A[1],2)+pow(A[2],2)); //модуль A[]
MB=sqrt(pow(B[0],2)+pow(B[1],2)+pow(B[2],2)); //модуль B[]
RIZN=2*MA-3*MB;
}
double PR (double)
{
int A[3];
A[0]=8;
A[1]=9;
A[2]=10;
int C[3];
C[0]=8;
C[1]=10;
C[2]=9;
double PR;
PR=((A[0]*C[0])+(A[1]*C[1])+(A[2]*C[2]))/(sqrt(pow(C[0],2)+pow(C[1],2)+pow(C[2],2)));
}
double FUNCTION (double)
{ int A[3];
A[0]=8;
A[1]=9;
A[2]=10;
int B[3];
B[0]=9;
B[1]=8;
B[2]=10;
int C[3];
C[0]=8;
C[1]=10;
C[2]=9;
double G, D;
D=((A[0]*B[0])+(A[1]*B[1])+(A[2]*B[2]));
G=PR*D;
}
Дополнен 14 лет назад
D:\Мои документы\C++\3-8\hgh\hgh.cpp(12) : error C2440: '=' : cannot convert from 'double (__cdecl *)(double)' to 'double'
There is no context in which this conversion is possible
D:\Мои документы\C++\3-8\hgh\hgh.cpp(13) : error C2440: '=' : cannot convert from 'double (__cdecl *)(double)' to 'double'
There is no context in which this conversion is possible
D:\Мои документы\C++\3-8\hgh\hgh.cpp(14) : error C2440: '=' : cannot convert from 'double (__cdecl *)(double)' to 'double'
There is no context in which this conversion is possible
D:\Мои документы\C++\3-8\hgh\hgh.cpp(71) : error C2296: '*' : illegal, left operand has type 'double (__cdecl *)(double)'
Error executing cl.exe.
hgh.exe - 4 error(s), 0 warning(s)