Whats wrong with this?

Hey I just started learning C++ today and am already encountering problems. I recently wrote this program:

#include <iostream>
#include <cmath>

int main() {
using namespace std;

double a;
a = sqrt(5);

cout << a;

system ("pause")
Return 0;
}

But whenever I try to compile it just says:

C:\Dev-Cpp\Untitled5.cpp
[Warning] In function `int main()':

What am I doing wrong?
no Return --->return
put ; after system ("pause")
put using namespace std before int main
sqrt is float function you should write 5.0

#include <iostream>
#include <cmath>
using namespace std;

int main() {
double a;
a = sqrt (5.0);
cout << a;
system ("pause");
return 0;
}
haha thanks cant believe i didnt see that -.- lol thanks :)
Topic archived. No new replies allowed.