im 12 and i code square root finder

#include <iostream>
#include <cmath>

int main(){
using namespace std;


double number;
double answer;

cin >> number;
answer = sqrt(number);
cout << answer << endl;

system("pause");
return 0;


}
Last edited on
lol you used sqrt from cmath library! That's hilarious
You should Google search "Why is using namespace std; bad?"

I started programming at 11 and started C++ a few years later. Nice to see an early starter ;)
Last edited on
Topic archived. No new replies allowed.