C
CGrunch
Guest
I got this error and I have no idea what's causing it. I haven't been able to find a clear solution online.
Code:
#include <iostream>
using namespace std;
int main()
{
int NUM1, NUM2;
cout << "Enter your first number: ";
cin >> NUM1;
cout << endl;
cout << "Enter your second number: ";
cin >> NUM2;
cout << endl; cout << endl; //moves cursor two lines down
int SUM = NUM1 + NUM2; //Sum
int DIFF = NUM1 - NUM2; //Difference
int PROD = NUM1 * NUM2; //Product
int INT_QUO = NUM1 / NUM2; //Integer quotient
float FLT_QUO = ((float)NUM1) / NUM2; //Float quotient
cout << "Sum: " << SUM; cout << endl;
cout << "Difference: " << DIFF; cout << endl;
cout << "Product: " << PROD; cout << endl;
cout << "Integer Quotient: " << INT_QUO; cout << endl;
cout << "Float Quotient: " << FLT_QUO; cout << endl;
return 0;
}
Help would be appreciated!
Continue reading...
Code:
#include <iostream>
using namespace std;
int main()
{
int NUM1, NUM2;
cout << "Enter your first number: ";
cin >> NUM1;
cout << endl;
cout << "Enter your second number: ";
cin >> NUM2;
cout << endl; cout << endl; //moves cursor two lines down
int SUM = NUM1 + NUM2; //Sum
int DIFF = NUM1 - NUM2; //Difference
int PROD = NUM1 * NUM2; //Product
int INT_QUO = NUM1 / NUM2; //Integer quotient
float FLT_QUO = ((float)NUM1) / NUM2; //Float quotient
cout << "Sum: " << SUM; cout << endl;
cout << "Difference: " << DIFF; cout << endl;
cout << "Product: " << PROD; cout << endl;
cout << "Integer Quotient: " << INT_QUO; cout << endl;
cout << "Float Quotient: " << FLT_QUO; cout << endl;
return 0;
}
Help would be appreciated!
Continue reading...