+ 2
What is the symbol for power?
What operator should we use to get a power of some no. Like I want to get 10^5. How can I get this in C++
5 Respostas
+ 2
C++ does not have an operator for that operation. Either you make yourself your own function, or use the preexisting pow() function:
http://www.cplusplus.com/reference/cmath/pow/
+ 4
cond() tests if a character is a digit, right? Why not use the built-in C++ function, saves you some work: http://www.cplusplus.com/reference/cctype/isdigit/
Same goes for num(), C++ has built-in functions for convertions from string/char to number:
http://www.cplusplus.com/reference/cstdlib/
You should have a look in the different headers grouped in the STL, they can save you a lot of work in future projects:
http://www.cplusplus.com/reference/
https://en.cppreference.com/w/cpp
+ 2
Thanq Naitomea
+ 1
Thanq you actually I was making this program of factorial calc.
https://code.sololearn.com/cyfjqbS4X5BC/?ref=app
Plz guyz upvote if you like. And if you find a mistake or have a better idea. Plz tell me.
0
Thanq you Naitomea
I have not quite reached this topic yet.