I was just wondering if it is possible to display the ^2 symbol and the square root symbol. I tried to copy and paste from another site and it gives me a weird striped box in the displayed product.
Thank you.
Output from a program may depend on system setup, you will have to tell us what OS you're using.
On systems that provide Unicode support to C++ programs (that means not Windows), it's as easy as this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
#include <locale>
int main()
{
// using system narrow character encoding
std::cout << "3² = 9\n"
<< "√9 = 3\n";
// using system wide character encoding
std::wcout.sync_with_stdio(false); // or set the C locale too
std::wcout.imbue(std::locale(""));
std::wcout << L"3² = 9\n"
<< L"√9 = 3\n";
}