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

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


3/18/2020 9:48:38 AM

Daniel Dankwah

3 Answers

New Answer


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


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


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)