+ 1
program to remove 10th digit from the input integer N
input: 569 output: 59
4 Respostas
+ 4
Exists many methods for get your "problem" solved... The important, here, is than you show your attempt
+ 1
First, you need to make the input an array; then remove the -2nd index of it.
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;
}
0
Python program