+ 2

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

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

18th Mar 2020, 9:48 AM
Daniel Dankwah
Daniel Dankwah - avatar
3 Réponses
+ 2
you can just do cout << "cm^3"; i guess
18th Mar 2020, 9:52 AM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 2
Just use unicode characters \uxxxx , I added a 'C' before the unicode \u33A5 which is ㎥ std::cout << "C\u33A5";
18th Mar 2020, 10:09 AM
AZTECCO
AZTECCO - avatar
+ 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)
18th Mar 2020, 10:03 AM
Taranjeet
Taranjeet - avatar