Integer to Digit Character

You are given an integer N representing a single digit from 0 to 9.

Your task is to convert this integer into its corresponding digit character and return the character.

Example 1:

Input:

N = 7

Output:

'7'

Explanation:

The given integer is 7. Adding the character '0' to the digit value converts it into the corresponding digit character '7'.

Example 2:

Input:

N = 0

Output:

'0'

Explanation:

The given integer is 0. Its corresponding digit character is '0'.

Still unsure what the problem is asking ?

Let’s go through a few more examples, step by step, to make it clearer.

Constraints:

  • 0 ≤ N ≤ 9

Hints

Frequently Occurring Doubts

Interview Follow-up Questions

0
class Solution {
public:
char integerToDigit(int N) {
// Write your code here
}
};
Test Case

Input:

N