The program must accept a number and remove the unit digit.
Note: The number is greater than 9.
Example Input/Output 1:
Input:
102
Output:
10
Example Input/Output 2:
Input:
12345
Output:
1234
Python
N = int(input())
print(N//10)
Java
import java.util.*;
public class Hello {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
System.out.print(N / 10);
}
}
C
#include <stdlib.h>
#include <stdio.h>
int main()
{
int N;
scanf("%d",&N);
printf("%d",N/10);
}
C++
#include <iostream>
using namespace std;
int main()
{
int N;
cin >> N;
cout << N/10;
return 0;
}