I am trying to create a program that gets the solution of a quadratic formula, but i keep getting an error and i cant figure it out.
1>quad.cpp(14) : error C2440: '=' : cannot convert from 'int (__cdecl *)(void)' to 'int'
1> There is no context in which this conversion is possible
1>quad.cpp(16) : error C2440: '=' : cannot convert from 'int (__cdecl *)(void)' to 'int'
1> There is no context in which this conversion is possible
1>quad.cpp(18) : error C2440: '=' : cannot convert from 'int (__cdecl *)(void)' to 'int'
1> There is no context in which this conversion is possible
1>quad - 3 error(s), 21 warning(s)
Here is the program
#include <iostream>
#include <stdio.h>
#include "simpio.h"
#include "strlib.h"
#include "random.h"
#include "math.h"
using namespace std;
int main()
{
int a, b, c, x, y, z;
printf("Enter A: ");
a = GetInteger;
printf("Enter B: ");
b = GetInteger;
printf("Enter c: ");
c = GetInteger;
z = (b*b-4*a*c)
x = ((-b - z)/(2*a));
y = ((-b + z)/(2*a));
if (x = y)
{
printf("There is one solution: %d", x);
}
else if (x != y)
{
printf("There are two solutions: %d and %d", x, y);
}
else
{
printf("There are no solutions");
}
system("pause");
}