当前位置:网站首页>Hexadecimal to decimal
Hexadecimal to decimal
2022-07-05 04:11:00 【CSDNhdlg】
#include<stdio.h>
int main(){
char s[50];
scanf("%s",s);
int t,i;
long sum=0;
for(i=0;s[i];i++){
if(s[i]<='9')
t=s[i]-'0';
else
t=s[i]-'A'+10;
sum=sum*16+t;
}
printf("%ld\n",sum);
return 0;
}
边栏推荐
- C语言课设:影院售票管理系统
- Technical tutorial: how to use easydss to push live streaming to qiniu cloud?
- Deflocculant aminoiodotide eye drops
- 我国算力规模排名全球第二:计算正向智算跨越
- 【虚幻引擎UE】实现测绘三脚架展开动画制作
- Interview related high-frequency algorithm test site 3
- 机器学习 --- 神经网络
- 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
- 测试开发是什么?为什么现在那么多公司都要招聘测试开发?
- 【刷题】BFS题目精选
猜你喜欢
Rome chain analysis
Alibaba cloud ECS uses cloudfs4oss to mount OSS
Test d'automatisation de l'interface utilisateur télécharger manuellement le pilote du navigateur à partir de maintenant
已解决(sqlalchemy+pandas.read_sql)AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
@The problem of cross database query invalidation caused by transactional annotation
Learning notes 8
Realize the attention function of the article in the applet
Threejs Internet of things, 3D visualization of farms (I)
[brush questions] BFS topic selection
Plasticscm enterprise crack
随机推荐
Clickhouse materialized view
我就一写代码的,王总整天和我谈格局...
open graph协议
How to solve the problem that easycvr changes the recording storage path and does not generate recording files?
NetSetMan pro (IP fast switching tool) official Chinese version v5.1.0 | computer IP switching software download
MacBook安装postgreSQL+postgis
Learning notes 8
The scale of computing power in China ranks second in the world: computing is leaping forward in Intelligent Computing
Pyqt pyside custom telescopic menu bar sharing (including tutorial)
provide/inject
A應用喚醒B應該快速方法
基于TCP的移动端IM即时通讯开发仍然需要心跳保活
Threejs factory model 3DMAX model obj+mtl format, source file download
Special Edition: spreadjs v15.1 vs spreadjs v15.0
Technical tutorial: how to use easydss to push live streaming to qiniu cloud?
Number of possible stack order types of stack order with length n
[untitled]
为什么百度、阿里这些大厂宁愿花25K招聘应届生,也不愿涨薪5K留住老员工?
根据入栈顺序判断出栈顺序是否合理
[phantom engine UE] package error appears! Solutions to findpin errors