r/C_Homework • u/elena_alva • Mar 24 '18
Need to remove a digit from a number
I need a clue on how to write a function that returns a number without a random digit. For example num=3456743 digit=4, the result should br 35673. Thank you anyway.
2
Upvotes
2
u/tresteo Mar 26 '18
You can use a function like this
2
u/[deleted] Mar 25 '18 edited Mar 25 '18
try convertig the number into a char string, then manipulate the string accordingly and convert it back into a number. There are also other ways to do it.