+ 1
How to input the square and cube numbers in c++?
3 Réponses
+ 8
Or #include <cmath> and use pow(number, 2) for square or pow(number, 3) for cube, though it's inefficient.
+ 1
thank you for your good answer .karl
0
For square multiply it for 2 time example int a than a will be a*a;
For cube 3 times like - a*a*a;