What is wrong with the '}'?

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
nothing is wrong with it.
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.
closed account (367kGNh0)
GUYS ITS MISSING A:


return 0;
a line under 13
!!!
Last edited on
That isnt required, though. Compilers default return zero now.
closed account (E0p9LyTq)
Are you getting errors? If you are, what are the errors?

If you are getting errors what compiler are you using?
closed account (367kGNh0)
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
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
Topic archived. No new replies allowed.