Coding | Mcqs | Multiple choice questions | Informative | Computer Science | Engineering | Aptitude | Quants | Verbal

INFEED

c++ very easy part 5 digit in tenth position

  The program must accept a positive integer N and print the digit in the tenth position.


Input Format:

The first line denotes the value of N.


Output Format:

The first line contains the value of N.


Boundary Conditions:

10 <= N <= 9999999


Example Input/Output 1:

Input:

20


Output:

2


Example Input/Output 2:

Input:

37843


Output:

4


Code:


#include<bits/stdc++.h>

using namespace std;


int main()

{

int a;
cin>>a;
cout<<(a/10)%10;


}

Post a Comment

Previous Post Next Post