+2

Please, how do i print unit cube (e.g. Cm^3) to the screen in c++?

Printing of cube (cm^3) in C++

c++

3/18/2020 9:48:38 AM

Daniel Dankwah

3 Answers

New Answer

+2

you can just do cout << "cm^3"; i guess

+2

Just use unicode characters \uxxxx , I added a 'C' before the unicode \u33A5 which is ㎥ std::cout << "C\u33A5";

+1

You can add a header #include <cmath> And then you can calculate by using the pow() function. pow(base, exponent) So based on your requirement you can use pow(cm, 3)