0
C programming
Guys how can i write a program in c that i get a number and then delete its zeros and again print it. For example if it gets 10034 print 134
1 Odpowiedź
+ 1
- input a number from stdin and let it as a char array.
- create a buffer of size = to the input
- copy all char from input to that buffer if char != '0'
- don't forget to add a null char at the end of the buffer
- print the buffer.