Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #digit #number
ADD COMMENT
Topic
Name
3+6 =