+ 1

program to remove 10th digit from the input integer N

input: 569 output: 59

19th May 2019, 7:09 AM
Nikash
5 Antworten
+ 4
Exists many methods for get your "problem" solved... The important, here, is than you show your attempt
19th May 2019, 7:44 AM
KrOW
KrOW - avatar
+ 1
First, you need to make the input an array; then remove the -2nd index of it.
19th May 2019, 7:21 AM
Airree
Airree - avatar
0
my code: #include <stdio.h> #include <conio.h> int main() { int dig,n,ot = 0,count=1; scanf("%d",&n); while(n!=0) { dig = n % 10; n = n / 10; if(dig % 2 == 0) { ot += dig*count; count *= 10; } } printf("%d",ot); return 0; }
19th May 2019, 9:21 AM
Nikash
0
Python program
24th Oct 2023, 2:45 PM
VINOTHKUMAR T 2022-2026
VINOTHKUMAR T 2022-2026 - avatar