当前位置:网站首页>Decimal to hexadecimal
Decimal to hexadecimal
2022-07-05 04:13:00 【CSDNhdlg】
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int main()
{
long long int a;
scanf("%lld",&a);
char q[100],w[100];
int cnt=0;
if(a==0)
printf("0\n");
else{
while(a){
q[++cnt]=a%16;
a/=16;
}
int num=0,i,j;
for(i=1;i<=cnt;i++){
if(q[i]<10)
w[++num]=q[i]+'0';
else
w[++num]=q[i]-10+'A';
}
for(j=num;j>=1;j--)
printf("%c",w[j]);
}
return 0;
}
边栏推荐
- IronXL for . NET 2022.6
- Technical tutorial: how to use easydss to push live streaming to qiniu cloud?
- 北京程序员的真实一天!!!!!
- 为什么百度、阿里这些大厂宁愿花25K招聘应届生,也不愿涨薪5K留住老员工?
- Threejs factory model 3DMAX model obj+mtl format, source file download
- MacBook installation postgresql+postgis
- A應用喚醒B應該快速方法
- Wechat applet development process (with mind map)
- Un réveil de l'application B devrait être rapide
- Threejs Internet of things, 3D visualization of farm (III) model display, track controller setting, model moving along the route, model adding frame, custom style display label, click the model to obt
猜你喜欢
[brush questions] BFS topic selection
Special Edition: spreadjs v15.1 vs spreadjs v15.0
[phantom engine UE] package error appears! Solutions to findpin errors
Why do big companies such as Baidu and Alibaba prefer to spend 25K to recruit fresh students rather than raise wages by 5K to retain old employees?
[phantom engine UE] only six steps are needed to realize the deployment of ue5 pixel stream and avoid detours! (the principles of 4.26 and 4.27 are similar)
@The problem of cross database query invalidation caused by transactional annotation
Rome链分析
【虚幻引擎UE】打包报错出现!FindPin错误的解决办法
[moteur illusoire UE] il ne faut que six étapes pour réaliser le déploiement du flux de pixels ue5 et éviter les détours! (4.26 et 4.27 principes similaires)
UI自動化測試從此告別手動下載瀏覽器驅動
随机推荐
我国算力规模排名全球第二:计算正向智算跨越
[understand series after reading] 6000 words teach you to realize interface automation from 0 to 1
为什么百度、阿里这些大厂宁愿花25K招聘应届生,也不愿涨薪5K留住老员工?
Convert Boolean to integer value PHP - Convert Boolean to integer value PHP
MacBook安装postgreSQL+postgis
[array]566 Reshape the matrix - simple
Alibaba cloud ECS uses cloudfs4oss to mount OSS
Rome chain analysis
UI自動化測試從此告別手動下載瀏覽器驅動
快手、抖音、视频号交战内容付费
The development of mobile IM based on TCP still needs to keep the heartbeat alive
The order of LDS links
CTF stegano practice stegano 9
【虚幻引擎UE】实现测绘三脚架展开动画制作
MySQL: view with subquery in the from clause limit
Laravel8 export excel file
【虛幻引擎UE】實現UE5像素流部署僅需六步操作少走彎路!(4.26和4.27原理類似)
[untitled]
Bit operation skills
C language course setting: cinema ticket selling management system