How can I make sure the user enters a positive number, and if its negative give them an error and make them retype it?
int main()
{
float sq, n;
cout << "Enter any number:";
cin >> n;
sq = sqrt(n);
cout << "Square root of " << n << " is " << sq;
return 0;
}