hi,i'm trying to get the sum and difference of two equations inputted by the keybroad in this program i appreciate suggestions how to correct the syntax errors to get the program to compile.
an example of equations:
3a+9b+10c-8d=6
9a-2b+3c-4d=4
#include <iostream>
#include <iomanip>
usingnamespace std;
int main()
{
int i1,
i2,
sum,
difference;
cout<<"Input the top equations: ";
cin>>i1;
cout<<"Input the bottom equations: ";
cin>>i2;
sum=i1+i2;
difference=i1-i2;
cout<<endl;
cout<<"The sum of "<<i1<<" and "<<i2<<" is "<<sum<<endl;
cout<<"The difference of "<<i1<<" and "<<i2<<" is "<<difference<<endl;
return 0;
}
1 2 3 4 5 6 7 8 9
1
1>Deleting intermediate and output files for project 'complex', configuration 'Debug|Win32'
1>Compiling...
1>complex.cpp
1>c:\users\martin\documents\visual studio 2008\projects\complex\complex\complex.cpp(30) : error C2059: syntax error : '}'
1>c:\users\martin\documents\visual studio 2008\projects\complex\complex\complex.cpp(30) : error C2143: syntax error : missing ';' before '}'
1>c:\users\martin\documents\visual studio 2008\projects\complex\complex\complex.cpp(30) : error C2059: syntax error : '}'
1>Build log was saved at "file://c:\Users\Martin\Documents\Visual Studio 2008\Projects\complex\complex\Debug\BuildLog.htm"
1>complex - 3 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========