Answers for "remove digit from number c++"

C++
0

remove digit from number c++

std::string n;
int k;
std::cin >> n >> k;
if (k > 0 && k <= n.size()) n.erase(k - 1, 1);
std::cout << n;
Posted by: Guest on October-13-2021

Code answers related to "remove digit from number c++"

Browse Popular Code Answers by Language