+ 1
Please what are some common mistakes in c++,I have already written a code but it doesn't compile and I don't know the problem
c++ compilation problem
4 Respostas
+ 5
Please show your code.
https://www.sololearn.com/discuss/1316935/?ref=app
+ 3
cout, cin and endl are defined in the standard library. To use them, you either need to replace each cout with std::cout (same with cin and endl), or you can simply add the line "using namespace std;" after #include <iostream>
+ 2
Here is the code
#include <iostream>
int main()
{
int a, b;
int sum;
cout << "Enter A Number \n";
cin >> a;
cout << "Entet Another Number \n";
cin >> b;
sum=a+b;
cout << " Answer Is: "<< sum << endl;
return 0;
}
+ 2
Thanks that really helped