Feb 8, 2019 at 2:44pm
What is wrong with my code. Do have a look :)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
#include <iostream>
using namespace std;
int main()
{
int a, b;
cin>>a;
cin>>b;
if (a>=b)
cout<<a;
else
cout<<b;
}
|
Last edited on Feb 8, 2019 at 2:45pm
Feb 8, 2019 at 2:54pm
nothing is wrong with it.
Feb 8, 2019 at 3:26pm
If you are using a fairly old compiler,
it may require that the source file must have a new line character right at the end.
Feb 8, 2019 at 7:37pm
GUYS ITS MISSING A:
return 0;
a line under 13
!!!
Last edited on Feb 8, 2019 at 7:39pm
Feb 8, 2019 at 7:48pm
That isnt required, though. Compilers default return zero now.
Feb 8, 2019 at 8:00pm
Are you getting errors? If you are, what are the errors?
If you are getting errors what compiler are you using?
Feb 8, 2019 at 8:18pm
Do you have MINGW or any compiler set up? If not the first 5 mins of this vid'll get you started:
https://www.youtube.com/watch?v=N2g53zKMrCg
Feb 8, 2019 at 8:50pm
If not the first 5 mins of this vid'll get you started:
|
Only if you happen to be a Windows user. And in that case I really suggest you consider Visual Studio.
Last edited on Feb 8, 2019 at 8:51pm