当前位置:网站首页>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;
}
边栏推荐
- Pyqt pyside custom telescopic menu bar sharing (including tutorial)
- Threejs realizes the drawing of the earth, geographical location annotation, longitude and latitude conversion of world coordinates threejs coordinates
- How to use jedis of redis
- How to realize real-time audio and video chat function
- 小程序中实现文章的关注功能
- [charging station]_ Secular wisdom_ Philosophical wisdom _
- Use threejs to create geometry, dynamically add geometry, delete geometry, and add coordinate axes
- Special Edition: spreadjs v15.1 vs spreadjs v15.0
- Uni app change the default component style
- Open graph protocol
猜你喜欢

快手、抖音、视频号交战内容付费

Use threejs to create geometry and add materials, lights, shadows, animations, and axes

C language course setting: cinema ticket selling management system

Laravel8 export excel file

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?

Common features of ES6

How to realize real-time audio and video chat function

Threejs realizes sky box, panoramic scene, ground grass

MacBook安装postgreSQL+postgis

error Couldn‘t find a package. JSON file in "your path“
随机推荐
已解决(sqlalchemy+pandas.read_sql)AttributeError: ‘Engine‘ object has no attribute ‘execution_options‘
Why can't all browsers on my computer open web pages
How does the applet solve the rendering layer network layer error?
Threejs clicks the scene object to obtain object information, and threejs uses raycaster to pick up object information
CTF stegano practice stegano 9
What is test development? Why do so many companies hire test developers now?
This article takes you to understand the relationship between the past and present of Bi and the digital transformation of enterprises
Ctfshow 2022 Spring Festival welcome (detailed commentary)
Learning MVVM notes (1)
A application wakes up B should be a fast method
Open graph protocol
蛇形矩阵
Use of vscode software
mysql的七种join连接查询
Deflocculant aminoiodotide eye drops
C语言课设:影院售票管理系统
Interview related high-frequency algorithm test site 3
Threejs implements labels and displays labels with custom styles
【thingsboard】替换首页logo的方法
长度为n的入栈顺序的可能出栈顺序