Ive just started to code in C++ and in my first hour of learning... I encounter an error.
I know programmers normally encounter lots of debugging but I dont know what Ive actually done wrong. The idea of my program was just to put a function and some input together. I currently am using Visual C++ 2008 Express Edition.. if that makes any difference. This is my program code.
// Square Roots.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <cmath>;
int _tmain(int argc, _TCHAR* argv[])
{` using namespace std;
int x
cout << "What is the number you would like to square root?";
cin >> x;
x= sqrt(x);
cout << x << endl;
cin.get();
return 0;
}
I know programmers normally encounter lots of debugging but I dont know what Ive actually done wrong. The idea of my program was just to put a function and some input together. I currently am using Visual C++ 2008 Express Edition.. if that makes any difference. This is my program code.
// Square Roots.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <cmath>;
int _tmain(int argc, _TCHAR* argv[])
{` using namespace std;
int x
cout << "What is the number you would like to square root?";
cin >> x;
x= sqrt(x);
cout << x << endl;
cin.get();
return 0;
}