Module: 子程序。递归


Problem

10/12

数字转十六进制数系统

Theory Click to read/hide

有用信息
英文字母'A'代码为 65
入口 char c = 65; 将英文字母A存入变量\(c\).
因此,您可以通过其代码获得所需的字母。

Problem

编写一个将数字转换为十六进制的递归过程。 

输入
程序的输入是数字 N (N <= 4096) - 第 10 个数字系统中的数字。

印记
在屏幕上显示一个数——十六进制数
 
例子
<头> <正文>

# 输入 输出
1 123 7B
Write the program below
using System;
class Program
{
  static void printfHex(int a){   
  }
static void Main(string[] args)
    {
     int N;
     N = int.Parse(Console.ReadLine());
     printfHex(N);
    }
}
     

     

Program check result

To check the solution of the problem, you need to register or log in!