top of page

Inlab 1

Nature of Digit in Position (Id = 2612)

Question:         

            Given a number ‘n’ and a position; Write an algorithm and subsequent ‘C’ program to Check if the ‘p-th’ Digit, Starting from left-most digiit of the number of the number ‘n’ is ‘odd’ or ‘even’.For most example , if ‘n’ is 3145782 and p is 4 then you have to check if 5 is odd or even. Since it is odd, print ‘Odd’. Make your code to accept numbers of large size.

Input Format:

The first line contains the number, n

The second line contains the position, p

 

Output Format:

 

Print either ‘Odd’ or ‘Even’

I'm a paragraph. Click here to add your own text and edit me. It's easy.

I'm a paragraph. Click here to add your own text and edit me. It's easy.

INPUT
OUTPUT
PROCESSING
C  PROGRAM

I'm a paragraph. Click here to add your own text and edit me. It's easy.

I'm a paragraph. Click here to add your own text and edit me. It's easy.

bottom of page