First of all compiling your this code with g++ doesn't mean it c++ what features of c++ you are using in it...
well the errors are
Code:
#include <stdio.h>
#include <math.h>
#include <windows.h> // include this file on ms windows for system API call
int main ()
{
int a, b, r1, r2;
printf("type in the 2 roots:");
scanf_s("%d %d", &a, &b); // , coma was missing
r1 = a+b;
r2 = a*b;
printf("the equation in general form is: x*x+(%f)x+(%f)",r1, r2); // ) brace and , was missing
system ("pause");
return 0;
}