#include <iostream>
#include <math.h>
#include "stdafx.h"
using namespace std;
int main()
{
float a, b;
cout << "Enter The Number: ";
cin >> a;
b = sqrt(a);
cout << "The Square Root of The Number Is: " << b;
return 0;
}
The Compiler gives the Error:
consoleapplication1.cpp(10): error C2065: 'cout': undeclared identifier
consoleapplication1.cpp(11): error C2065: 'cin': undeclared identifier
consoleapplication1.cpp(12): error C3861: 'sqrt': identifier not found
consoleapplication1.cpp(13): error C2065: 'cout': undeclared identifier
Please tell me the error and also why do I include "stdafx.h" and why is it in quotation marks?? Using Visual Studio 2015. Level: Beginner